Solution to Word Break by LeetCode

18 Jul

Question: https://oj.leetcode.com/problems/word-break/ Question Name: Word Break Similar with Palindrome Partitioning II by LeetCode. Dynamic programming is suitable here.

Solution to Copy List with Random Pointer by LeetCode

18 Jul

Question: https://oj.leetcode.com/problems/copy-list-with-random-pointer/ Question Name: Copy List with Random Pointer Quite similar with the Clone Graph by LeetCode.

Solution to Single Number by LeetCode

18 Jul

Question: https://oj.leetcode.com/problems/single-number/ Question Name: Single Number

Solution to Candy by LeetCode

18 Jul

Question: https://oj.leetcode.com/problems/candy/ Question Name: Candy

Solution to Gas Station by LeetCode

17 Jul

Question: https://oj.leetcode.com/problems/gas-station/ Question Name: Gas Station

Solution to Clone Graph by LeetCode

17 Jul

Question: https://oj.leetcode.com/problems/clone-graph/ Question Name: Clone Graph

Solution to Palindrome Partitioning II by LeetCode

17 Jul

Question: https://oj.leetcode.com/problems/palindrome-partitioning-ii/ Question Name: Palindrome Partitioning II

Solution to Palindrome Partitioning by LeetCode

15 Jul

Question: https://oj.leetcode.com/problems/palindrome-partitioning/ Question Name: Palindrome Partitioning One simple solution is as following. It is easy to understand. And it passed all the tests.

We could do it better! Do it! Do it better with Manacher’s algorithm! BUT K.I.S.S.

Solution to Surrounded Regions by LeetCode

13 Jul

Question: https://oj.leetcode.com/problems/surrounded-regions/ Question Name: Surrounded Regions