摘要:
Write a function to find the longest common prefix string amongst an array of strings.Solution:第0个字符串和其他字符串逐个求前缀对strs做了一个排序操作:Arrays.sort(strs);使得最终结果... 阅读全文
posted @ 2014-10-26 16:13
Phoebe815
阅读(133)
评论(0)
推荐(0)
摘要:
Given a non-negative number represented as an array of digits, plus one to the number.The digits are stored such that the most significant digit is at... 阅读全文
posted @ 2014-10-26 16:11
Phoebe815
阅读(125)
评论(0)
推荐(0)
摘要:
Determine whether an integer is a palindrome. Do this without extra space.click to show spoilers.Some hints:Could negative integers be palindromes? (i... 阅读全文
posted @ 2014-10-26 15:39
Phoebe815
阅读(146)
评论(0)
推荐(0)
摘要:
Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).For example, this binary tree is symmetric: 1 / \ ... 阅读全文
posted @ 2014-10-26 15:17
Phoebe815
阅读(133)
评论(0)
推荐(0)
摘要:
Given a stringsconsists of upper/lower-case alphabets and empty space characters' ', return the length of last word in the string.If the last word doe... 阅读全文
posted @ 2014-10-26 13:54
Phoebe815
阅读(131)
评论(0)
推荐(0)
摘要:
Given a binary tree, determine if it is height-balanced.For this problem, a height-balanced binary tree is defined as a binary tree in which the depth... 阅读全文
posted @ 2014-10-26 13:29
Phoebe815
阅读(168)
评论(0)
推荐(0)
摘要:
Given an array and a value, remove all instances of that value in place and return the new length.The order of elements can be changed. It doesn't mat... 阅读全文
posted @ 2014-10-26 12:20
Phoebe815
阅读(132)
评论(0)
推荐(0)
摘要:
Given a binary tree struct TreeLinkNode { TreeLinkNode *left; TreeLinkNode *right; TreeLinkNode *next; }Populate each next pointe... 阅读全文
posted @ 2014-10-26 02:00
Phoebe815
阅读(155)
评论(0)
推荐(0)

浙公网安备 33010602011771号