Solution to Reverse Nodes in k-Group by LeetCode

24 Apr

Question: http://oj.leetcode.com/problems/reverse-nodes-in-k-group/ Question Name: Reverse Nodes in k-Group

Solution to Count-Distinct-Slices by codility

17 Apr

Question: https://codility.com/demo/take-sample-test/count_distinct_slices Question Name: Count-Distinct-Slices or CountDistinctSlices

Solution to Count-Triangles by codility

17 Apr

Question: https://codility.com/demo/take-sample-test/count_triangles Question Name: Count-Triangles or CountTriangles This problem is nearly the same as the exercise in presentation of lesson 13. Update on May 24, 2014: Thanks to @Adam. Fix a bug, which lower the performance.

Solution to Count-Div by codility

16 Apr

Question: https://codility.com/demo/take-sample-test/count_div Question Name: Count-Div or CountDiv It is completely a mathematic question. Not qualified for a 2-star problem.

Solution to Swap Nodes in Pairs by LeetCode

11 Apr

Question: http://oj.leetcode.com/problems/swap-nodes-in-pairs/ Question Name: Swap Nodes in Pairs

Solution to Merge k Sorted Lists by LeetCode

11 Apr

Question: http://oj.leetcode.com/problems/merge-k-sorted-lists/ Question Name: Merge k Sorted Lists

Solution to Generate Parentheses by LeetCode

11 Apr

Question: http://oj.leetcode.com/problems/generate-parentheses/ Question Name: Generate Parentheses A good question to show the good side of recursion. Memorization could improve the performance.

Solution to Valid Parentheses by LeetCode

11 Apr

Question: http://oj.leetcode.com/problems/valid-parentheses/ Question Name: Valid Parentheses

Solution to Remove Nth Node From End of List by LeetCode

11 Apr

Question: http://oj.leetcode.com/problems/remove-nth-node-from-end-of-list/ Question Name: Remove Nth Node From End of List