![](https://img-blog.csdnimg.cn/20190702223235598.png?x-oss-process=image/resize,m_fixed,h_224,w_224)
LeetCode
LeetCode
郝大侠001
一只程序猿!
展开
-
617. Merge Two Binary Trees
Input: Tree 1 Tree 2 1 2 / \ / \ ...原创 2019-03-09 20:35:33 · 174 阅读 · 0 评论 -
110. Balanced Binary Tree
Given a binary tree, determine if it is height-balanced. For this problem, a height-balanced binary tree is defined as: a binary tree in which the depth of the two subtrees of every node never differ ...原创 2019-03-09 20:28:41 · 134 阅读 · 0 评论 -
104. Maximum Depth of Binary Tree
一棵树要么是空树,要么有两个指针,每个指针指向一棵树。树是一种递归结构,很多树的问题可以使用递归来处理。 Maximum Depth of Binary Tree Given a binary tree, find its maximum depth. The maximum depth is the number of nodes along the longest path from th...原创 2019-03-09 20:17:39 · 93 阅读 · 0 评论 -
215. Kth Largest Element in an Array
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. Example 1: Input: [3,2,1,5,6,4] and k = 2 Output: 5 class ...原创 2019-03-08 18:19:32 · 130 阅读 · 0 评论 -
524. Longest Word in Dictionary through Deleting(med)
Given a string and a string dictionary, find the longest string in the dictionary that can be formed by deleting some characters of the given string. If there are more than one possible results, retur...原创 2019-03-06 07:22:28 · 118 阅读 · 0 评论 -
88. Merge Sorted Array(Easy)
Given two sorted integer arrays nums1 and nums2, merge nums2 into nums1 as one sorted array. Input: nums1 = [1,2,3,0,0,0], m = 3 nums2 = [2,5,6], n = 3 Output: [1,2,2,3,5,6] class Solution { ...原创 2019-03-05 18:42:24 · 127 阅读 · 0 评论 -
141. Linked List Cycle (Easy)-java
Given a linked list, determine if it has a cycle in it. Input: head =[3,2,0,-4], pos = 1 Output: true Explanation: There is a cycle in the linked list, where tail connects to the second node. input中的...原创 2019-03-05 07:19:24 · 105 阅读 · 0 评论