摘要:
http://oj.leetcode.com/problems/longest-palindromic-substring/Given a string S, find the longest palindromic substring in S. You may assume that the maximum length of S is 1000, and there exists one unique longest palindromic substring.思路:这题有牛B的算法,大家可以自己Google。这里用一种比较简单的算法,虽然不够快但是也能过OJ。如果一个字符串已经是回文字 阅读全文
摘要:
http://oj.leetcode.com/problems/add-two-numbers/You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it as a linked list.Input: (2 -> 4 -> 3) + (5 -> 6 -> 阅读全文