上一页 1 ··· 9 10 11 12 13 14 15 16 17 ··· 41 下一页
摘要: Given a binary tree, return the inorder traversal of its nodes' values. For example:Given binary tree [1,null,2,3], return [1,3,2]. 非递归方法写二叉树的中序遍历 阅读全文
posted @ 2016-08-13 18:13 冰凌花花~ 阅读(172) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree, return the preorder traversal of its nodes' values. For example:Given binary tree {1,#,2,3}, return [1,2,3]. 二叉树的前序遍历,非递归的写法考的比较多 阅读全文
posted @ 2016-08-12 19:16 冰凌花花~ 阅读(123) 评论(0) 推荐(0) 编辑
摘要: Hi 大家,这道题是leetcode上的find peak element的题,不是lintcode的那道, 这两道题是有区别的,lintcode的题目中说明了:只有某个数左右两侧的元素都小于它,这个数才是峰值, 而leetcode的题,是只要找到个最大值就行,可以是[1,2]里的2这种。 A pe 阅读全文
posted @ 2016-08-11 12:35 冰凌花花~ 阅读(176) 评论(0) 推荐(0) 编辑
摘要: Given a sorted array of n integers, find the starting and ending position of a given target value. If the target is not found in the array, return [-1 阅读全文
posted @ 2016-08-10 23:44 冰凌花花~ 阅读(126) 评论(0) 推荐(0) 编辑
摘要: Hi 大家,这道题是lintcode上的find peak element的题,不是leecode的那道, 这两道题是有区别的,这道题的题目中说明了:只有左右两侧的数都小于某个元素,这种才是峰值, 而leetcode的题,是只要找到个最大值就行,可以是[1,2]这种。 There is an int 阅读全文
posted @ 2016-08-10 18:56 冰凌花花~ 阅读(271) 评论(0) 推荐(0) 编辑
摘要: You are a product manager and currently leading a team to develop a new product. Unfortunately, the latest version of your product fails the quality c 阅读全文
posted @ 2016-08-09 23:25 冰凌花花~ 阅读(150) 评论(0) 推荐(0) 编辑
摘要: Given a big sorted array with positive integers sorted by ascending order. The array is so big so that you can not get the length of the whole array d 阅读全文
posted @ 2016-08-09 22:32 冰凌花花~ 阅读(1025) 评论(0) 推荐(0) 编辑
摘要: 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). Find the minimum element. 阅读全文
posted @ 2016-08-07 23:03 冰凌花花~ 阅读(147) 评论(0) 推荐(0) 编辑
摘要: For a given sorted array (ascending order) and a target number, find the first index of this number in O(log n) time complexity. If the target number 阅读全文
posted @ 2016-08-07 22:22 冰凌花花~ 阅读(199) 评论(0) 推荐(0) 编辑
摘要: Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties: Integers in each row are sorted f 阅读全文
posted @ 2016-08-07 20:58 冰凌花花~ 阅读(184) 评论(0) 推荐(0) 编辑
上一页 1 ··· 9 10 11 12 13 14 15 16 17 ··· 41 下一页