![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
LeetCode
Shishishi888
这个作者很懒,什么都没留下…
展开
-
LeetCode 894. All Possible Full Binary Trees(所有可能的满二叉树)
题目描述:Afull binary treeis a binary tree where each node has exactly 0 or 2children.Return a list of all possible full binary trees withNnodes. Each element of the answer is the root node of o...原创 2019-03-25 17:57:27 · 216 阅读 · 0 评论 -
LeetCode 872. Leaf-Similar Trees(叶子相似的树)
题目描述:Consider all the leaves of a binary tree. Fromleft to right order, the values of thoseleaves form aleaf value sequence.For example, in the given tree above, the leaf value sequence is(...原创 2019-05-05 20:05:28 · 226 阅读 · 0 评论 -
LeetCode 215. Kth Largest Element in an Array(数组中的第K个最大元素)
题目描述:Find thekth largest element in an unsorted array. Note that it is the kth largest element in the sorted order, not the kth distinct element.Example 1:Input: [3,2,1,5,6,4] and k = 2Output...原创 2019-04-18 20:34:15 · 137 阅读 · 0 评论 -
LeetCode 475. Heaters(供暖器)
题目描述:Winter is coming! Your first job during the contest is to design a standard heater with fixed warm radius to warm all the houses.Now, you are given positions of houses and heaters on a horizo...原创 2019-04-03 19:13:59 · 260 阅读 · 0 评论 -
LeetCode 704. Binary Search(二分查找)
题目描述:Given asorted(in ascending order) integer arraynumsofnelements and atargetvalue, write a function to searchtargetinnums. Iftargetexists, then return its index, otherwise return-1....原创 2019-04-15 20:11:33 · 176 阅读 · 0 评论 -
LeetCode 441. Arranging Coins(排列硬币)
题目描述:You have a total ofncoins that you want to form in a staircase shape, where everyk-th row must have exactlykcoins.Givenn, find the total number offullstaircase rows that can be formed...原创 2019-04-15 19:47:15 · 149 阅读 · 0 评论 -
LeetCode 852. Peak Index in a Mountain Array(山脉数组的峰顶索引)
题目描述:Let's call an arrayAamountainif the following properties hold:A.length >= 3 There exists some0 < i< A.length - 1such thatA[0] < A[1] < ... A[i-1] < A[i] > A[i+1]...原创 2019-04-08 19:28:09 · 177 阅读 · 0 评论 -
LeetCode 198. House Robber(打家劫舍)
题目描述:You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only constraint stopping you from robbing each of them is that adjacen...原创 2019-03-28 20:33:34 · 156 阅读 · 0 评论 -
LeetCode 698. Partition to K Equal Sum Subsets(划分为K个相等的子集)
题目描述:Given an array of integersnumsand a positive integerk, find whether it's possible to divide this array intoknon-empty subsets whose sums are all equal.给定一个整数数组nums和一个正整数k,找出是否有可能把...原创 2019-03-27 11:57:03 · 373 阅读 · 1 评论 -
LeetCode 101. Symmetric Tree(对称二叉树)
题目描述:Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).For example, this binary tree[1,2,2,3,4,4,3]is symmetric: 1 / \ 2 2 / \ / \3 4 ...原创 2019-05-05 20:16:46 · 160 阅读 · 0 评论