上一页 1 ··· 4 5 6 7 8 9 10 11 12 下一页

2014年8月25日

Best Time to Buy and Sell Stock系列

摘要: Best Time to Buy and Sell Stock Say you have an array for which the ith element is the price of a given stock on day i. If you were only permitted to 阅读全文

posted @ 2014-08-25 15:38 bug睡的略爽 阅读(175) 评论(0) 推荐(0) 编辑

2014年8月23日

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 longes 阅读全文

posted @ 2014-08-23 20:48 bug睡的略爽 阅读(134) 评论(0) 推荐(0) 编辑

Palindrome Partitioning系列

摘要: Palindrome Partitioning Given a string s, partition s such that every substring of the partition is a palindrome. Return all possible palindrome parti 阅读全文

posted @ 2014-08-23 20:27 bug睡的略爽 阅读(155) 评论(0) 推荐(0) 编辑

2014年8月22日

Distinct Subsequences

摘要: Given a string S and a string T, count the number of distinct subsequences of T in S. A subsequence of a string is a new string which is formed from t 阅读全文

posted @ 2014-08-22 20:26 bug睡的略爽 阅读(135) 评论(0) 推荐(0) 编辑

Binary Tree Maximum Path Sum

摘要: Given a binary tree, find the maximum path sum. The path may start and end at any node in the tree. For example:Given the below binary tree, 1 / \ 2 3 阅读全文

posted @ 2014-08-22 16:53 bug睡的略爽 阅读(119) 评论(0) 推荐(0) 编辑

Longest Consecutive Sequence

摘要: Given an unsorted array of integers, find the length of the longest consecutive elements sequence. For example,Given [100, 4, 200, 1, 3, 2],The longes 阅读全文

posted @ 2014-08-22 16:21 bug睡的略爽 阅读(137) 评论(0) 推荐(0) 编辑

Sum Root to Leaf Numbers

摘要: Given a binary tree containing digits from 0-9 only, each root-to-leaf path could represent a number. An example is the root-to-leaf path 1->2->3 whic 阅读全文

posted @ 2014-08-22 15:55 bug睡的略爽 阅读(106) 评论(0) 推荐(0) 编辑

2014年8月19日

Reverse Integer

摘要: Reverse digits of an integer. Example1: x = 123, return 321Example2: x = -123, return -321 click to show spoilers. Have you thought about this? Here a 阅读全文

posted @ 2014-08-19 23:29 bug睡的略爽 阅读(138) 评论(0) 推荐(0) 编辑

Valid Palindrome

摘要: Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases. For example,"A man, a plan, a canal: Pan 阅读全文

posted @ 2014-08-19 23:10 bug睡的略爽 阅读(149) 评论(0) 推荐(0) 编辑

Palindrome Number

摘要: Determine whether an integer is a palindrome. Do this without extra space. click to show spoilers. Some hints: Could negative integers be palindromes? 阅读全文

posted @ 2014-08-19 22:54 bug睡的略爽 阅读(116) 评论(0) 推荐(0) 编辑

上一页 1 ··· 4 5 6 7 8 9 10 11 12 下一页

导航