摘要:
String to Integer (atoi)2014.2.10 02:23Implementatoito convert a string to an integer.Hint:Carefully consider all possible input cases. If you want a challenge, please do not see below and ask yourself what are the possible input cases.Notes:It is intended for this problem to be specified vaguely (i 阅读全文
摘要:
Longest Palindromic Substring2014.2.10 00:57Given a stringS, find the longest palindromic substring inS. You may assume that the maximum length ofSis 1000, and there exists one unique longest palindromic substring.Solution1: My first solution to this problem is the brute-force version, with O(n^2) . 阅读全文