leetcode
TzyProgram
见证技术成长.C
展开
-
Leetcode_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.原创 2014-07-23 10:03:01 · 271 阅读 · 0 评论 -
Leetcode_AddTwoNumbers
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 link原创 2014-07-23 10:13:53 · 257 阅读 · 0 评论 -
Leetcode_LongestSubstringWithoutRepeatingCharacters
Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters for "abcabcbb" is "abc", which the length is 3. Fo原创 2014-07-23 10:16:15 · 289 阅读 · 0 评论 -
Leetcode_Zig Zag Conversion
string convert(string s, int nRows) { if(nRows == 1)return s; string ans = s; int k = 2*(nRows-1); int index = 0; for(int i = 0; i < nRows; ++i){ int increment = k - 2*i; int currentindex =原创 2014-07-24 05:17:16 · 404 阅读 · 0 评论 -
Leetcode_String To Integer
Implement atoi to 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 ca原创 2014-07-24 05:07:57 · 275 阅读 · 0 评论 -
Leetcode_Ksum题目总结
Letcode上面有几道关于K sum的问题,zui原创 2014-07-27 10:41:02 · 377 阅读 · 0 评论