Prototype Pattern

Prototype Pattern will use object instance to create a new same object instance. So in this way, the two instance has some relationship like this:

Read More

Singleton Pattern

Singleton Pattern is a kind of design pattern which used to keep a object unique. For every user who want to use this class to create a object, he should get the same one. Singleton pattern could be used in many scenarios:

Read More

System Design Note

Web failure rate analysis(divide and conquer )

Read More

LeetCode Note Oct-2

473. Matchsticks to Square

    Read More

    LeetCode Note Oct-1

    4. Median of Two Sorted Arrays

      Read More

      LeetCode Note Sep-4

      376. Wiggle Subsequence

        Read More

        LeetCode Note Sep-3

        416. Partition Equal Subset Sum

        Classic 0-1 Knapsack probles. Use two dimension array dp[i][j] to represent that end at i-th element can find the sum j.

        Read More

        LeetCode Note Sep-2

        218. The Skyline Problem

          Read More

          LeetCode Note Sep-1

          93. Restore IP Addresses

            Read More

            Exponentiating by Squaring(快速幂)

            Composition Mod

            power (a , b) % m in O(n)

            For every number b, we have the representation of b in this way:

            Read More