- 博客(4)
- 收藏
- 关注
原创 Kth Largest Element in an Array
Question: Find the kth largest element in an unsorted array. Note that it is the kth largest element in the sorted order, not the kth distinct element. For example: Given [3,2,1,5,6,4] and k = 2,
2017-09-23 19:58:21 176
原创 Minimum Depth of Binary Tree
问题描述: 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 leaf node. 思路分析:这属于深度优先搜索的题目,但涉及到二叉树我们自然而
2017-09-23 19:26:53 194
原创 Majority Element
问题描述: Given an array of size n, find the majority element. The majority element is the element that appears more than ⌊ n/2 ⌋ times. You may assume that the array is non-empty and the majority ele
2017-09-12 17:31:42 176
原创 Two Sum
Question: Given an array of integers, return indices of the two numbers such that they add up to a specific target. You may assume that each input would have exactly one solution, and you may not
2017-09-12 16:33:34 213
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人