- 博客(5)
- 资源 (2)
- 收藏
- 关注
原创 Minimum Moves to Equal Array Elements II
题目描述:Given a non-empty integer array, find the minimum number of moves required to make all array elements equal, where a move is incrementing a selected element by 1 or decrementing a selected elemen
2017-10-30 15:40:39 493
原创 Maximum Product of Word Lengths
题目描述:Given a string array words, find the maximum value of length(word[i]) * length(word[j]) where the two words do not share common letters. You may assume that each word will contain only lower case
2017-10-30 15:33:07 506
原创 Two Sum IV - Input is a BST
题目描述:Given a Binary Search Tree and a target number, return true if there exist two elements in the BST such that their sum is equal to the given target.Example 1:Input: 5 / \ 3 6 / \ \
2017-10-30 15:26:16 403
原创 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-10-30 15:21:29 344
原创 Subsets
题目描述:Given a set of distinct integers, nums, return all possible subsets (the power set).Note: The solution set must not contain duplicate subsets.For example,If nums = [1,2,3], a solution is:[ [3],
2017-10-30 15:16:37 1284
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人