Solution to Palindrome Number by LeetCode

27 Mar

Question: http://oj.leetcode.com/problems/palindrome-number/ Question Name: Palindrome Number

Solution to String to Integer (atoi) by LeetCode

27 Mar

Question: http://oj.leetcode.com/problems/string-to-integer-atoi/ Question Name:  String to Integer (atoi)

Solution to Reverse Integer by LeetCode

27 Mar

Question: http://oj.leetcode.com/problems/reverse-integer/ Question Name: Reverse Integer Python is an overwhelmingly excellent choice to solve this question, right? Firstly, this is a non-recursive solution:

 We also provide a recursive solution as following:

UPDATE: challenge updated to test the overflow … Read More »

Solution to ZigZag Conversion by LeetCode

27 Mar

Question: http://oj.leetcode.com/problems/zigzag-conversion/ Question Name: ZigZag Conversion

Solution to Longest Palindromic Substring by LeetCode

27 Mar

Question: http://oj.leetcode.com/problems/longest-palindromic-substring/ Question Name: Longest Palindromic Substring Completely the same basis as this problem by Codility.

Solution to Add Two Numbers by LeetCode

26 Mar

Question: http://oj.leetcode.com/problems/add-two-numbers/ Question Name: Add Two Numbers

Solution to Longest Substring Without Repeating Characters by LeetCode

26 Mar

Question: http://oj.leetcode.com/problems/longest-substring-without-repeating-characters/ Question Name: Longest Substring Without Repeating Characters This is a typical dynamic programming problem.

Solution to Two-Sum by LeetCode

24 Mar

Question: http://oj.leetcode.com/problems/two-sum/ Question Name: Two Sum Futher reading: http://stackoverflow.com/questions/8334981/find-pair-of-numbers-in-array-that-add-to-given-sum