上一页 1 2 3 4 5 6 7 8 9 ··· 11 下一页
  2015年5月11日
摘要: Suppose a sorted array is rotated at some pivot unknown to you beforehand.(i.e., 0 1 2 4 5 6 7 might become 4 5 6 7 0 1 2).You are given a target valu... 阅读全文
posted @ 2015-05-11 23:11 黄瓜小肥皂 阅读(147) 评论(0) 推荐(0) 编辑
摘要: Implement an iterator over a binary search tree (BST). Your iterator will be initialized with the root node of a BST.Calling next() will return the ne... 阅读全文
posted @ 2015-05-11 23:02 黄瓜小肥皂 阅读(126) 评论(0) 推荐(0) 编辑
  2015年5月10日
摘要: Given a binary tree, find its minimum depth.The minimum depth is the number of nodes along the shortest path from the root node down to the nearest le... 阅读全文
posted @ 2015-05-10 07:46 黄瓜小肥皂 阅读(155) 评论(0) 推荐(0) 编辑
摘要: 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 longest... 阅读全文
posted @ 2015-05-10 07:34 黄瓜小肥皂 阅读(114) 评论(0) 推荐(0) 编辑
  2015年5月9日
摘要: 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 @ 2015-05-09 07:38 黄瓜小肥皂 阅读(127) 评论(0) 推荐(0) 编辑
  2015年5月8日
摘要: Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the given sum.Fo... 阅读全文
posted @ 2015-05-08 10:33 黄瓜小肥皂 阅读(126) 评论(0) 推荐(0) 编辑
摘要: Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it is able to trap after raining.... 阅读全文
posted @ 2015-05-08 10:21 黄瓜小肥皂 阅读(131) 评论(0) 推荐(0) 编辑
摘要: Given two sorted integer arrays nums1 and nums2, merge nums2 into nums1 as one sorted array.Note:You may assume that nums1 has enough space (size that... 阅读全文
posted @ 2015-05-08 10:04 黄瓜小肥皂 阅读(103) 评论(0) 推荐(0) 编辑
摘要: Given numRows, generate the first numRows of Pascal's triangle.For example, given numRows = 5,Return[ [1], [1,1], [1,2,1],[1,3,3,1], [1,4,6,... 阅读全文
posted @ 2015-05-08 09:57 黄瓜小肥皂 阅读(126) 评论(0) 推荐(0) 编辑
摘要: 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 which... 阅读全文
posted @ 2015-05-08 09:52 黄瓜小肥皂 阅读(156) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 ··· 11 下一页