Solution to Minimum Size Subarray Sum by LeetCode

1 Jan

Question: Question Name: Minimum Size Subarray Sum This question is very similar with Longest Substring Without Repeating Characters and Minimum Window Substring.

Solution to Implement Trie (Prefix Tree) by LeetCode

1 Jan

Question: Question Name: Implement Trie (Prefix Tree) Not a full implementation. The delete function is not required.

Solution to Course Schedule by LeetCode

22 Dec

Question: Question Name: Course Schedule


Solution to Polygon-Concavity-Index by codility

18 Oct

Question: Question Name: Polygon-Concavity-Index or PolygonConcavityIndex Thanks to Robert Sedgewick, the Youtube video (Algorithms, Part I – Convex Hull) tells everything about this problem.

Solution to Odd-Occurrences-In-Array by codility

18 Sep

Question: Question Name: Odd-Occurrences-In-Array or OddOccurrencesInArray This question is completely the same as the Perm-Missing-Elem by codility. The comment from Kim is very helpful.

Solution to Number-Solitaire by codility

6 Sep

Question: Question Name: Number-Solitaire or NumberSolitaire The key point is: to achieve the position i, we can only come from the positions i-6, i-5, i-4, i-3, i-2, and i-1.

Solution to Reverse Linked List by LeetCode

3 Sep

Question: Question Name: Reverse Linked List

Solution to Isomorphic Strings by LeetCode

1 Sep

Question: Question Name: Isomorphic Strings The key point is to avoid 2+ characters map to the same character.

Solution to Count Primes by LeetCode

29 Aug

Question: Question Name: Count Primes