Solution to Minimum Size Subarray Sum by LeetCode

1 Jan

Question: https://leetcode.com/problems/minimum-size-subarray-sum/ 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: https://leetcode.com/problems/implement-trie-prefix-tree/ 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: https://leetcode.com/problems/course-schedule/ Question Name: Course Schedule

   

Solution to Polygon-Concavity-Index by codility

18 Oct

Question: https://codility.com/demo/take-sample-test/polygon_concavity_index/ 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: https://codility.com/programmers/task/odd_occurrences_in_array 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: https://codility.com/demo/take-sample-test/number_solitaire/ 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: https://leetcode.com/problems/reverse-linked-list/ Question Name: Reverse Linked List

Solution to Isomorphic Strings by LeetCode

1 Sep

Question: https://leetcode.com/problems/isomorphic-strings/ 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: https://leetcode.com/problems/count-primes/ Question Name: Count Primes