L_J_SHOU

2014年2月16日

LeetCode----Longest Palindromic Substring

摘要: Description:Given a stringS, find the longest palindromic substring inS. You may assume that the maximum length ofSis 1000, and there exists one uniqu... 阅读全文

posted @ 2014-02-16 20:54 L_J_SHOU 阅读(126) 评论(0) 推荐(0)
LeetCode----Insertion sort list

摘要: /** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; *... 阅读全文

posted @ 2014-02-16 17:11 L_J_SHOU 阅读(114) 评论(0) 推荐(0)
LeetCode----Sort List

摘要: Sort a linked list inO(nlogn) time using constant space complexity.采用 归并排序。/** * Definition for singly-linked list. * struct ListNode { * int val;... 阅读全文

posted @ 2014-02-16 17:10 L_J_SHOU 阅读(114) 评论(0) 推荐(0)
LeetCode----Median of Two Sorted Arrays

摘要: Median of Two Sorted ArraysThere are two sorted arrays A and B of size m and n respectively. Find the median of the two sorted arrays. The overall run... 阅读全文

posted @ 2014-02-16 15:00 L_J_SHOU 阅读(130) 评论(0) 推荐(0)
LeetCode----Longest Substring Without Repeating Characters

摘要: Longest Substring Without Repeating CharactersGiven a string, find the length of the longest substring without repeating characters.For example, the l... 阅读全文

posted @ 2014-02-16 13:14 L_J_SHOU 阅读(130) 评论(0) 推荐(0)