![](https://img-blog.csdnimg.cn/20201014180756918.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
leetcode
文章平均质量分 69
huangjw47
这个作者很懒,什么都没留下…
展开
-
LeetCode No.106 Construct Binary Tree from Inorder and Postorder Traversal
LeetCode No.106 Construct Binary Tree from Inorder and Postorder Traversal原创 2016-11-02 21:33:43 · 200 阅读 · 0 评论 -
LeetCode No.226 Invert Binary Tree
LeetCode No.226 Invert Binary Tree原创 2016-11-03 00:22:34 · 208 阅读 · 0 评论 -
LeetCode No.257 Binary Tree Paths
LeetCode No.257 Binary Tree Paths原创 2016-11-03 00:38:41 · 249 阅读 · 0 评论 -
LeetCode No.199 Binary Tree Right Side View
LeetCode No.199 Binary Tree Right Side View原创 2016-11-03 00:48:42 · 204 阅读 · 0 评论 -
LeetCode No.114 Flatten Binary Tree to Linked List
LeetCode No.114 Flatten Binary Tree to Linked List原创 2016-11-03 08:59:55 · 264 阅读 · 0 评论 -
LeetCode No.297 Serialize and Deserialize Binary Tree
LeetCode No.297 Serialize and Deserialize Binary Tree原创 2016-11-03 16:10:08 · 239 阅读 · 0 评论 -
LeetCode No.416 Partition Equal Subset Sum
LeetCode No.416 Partition Equal Subset Sum原创 2016-11-03 16:34:47 · 236 阅读 · 0 评论 -
LeetCode No.67 Add Binary
LeetCode No.67 Add Binary原创 2016-11-03 17:11:01 · 188 阅读 · 0 评论 -
LeetCode No.98 Validate Binary Search Tree
LeetCode No.98 Validate Binary Search Tree原创 2016-11-04 11:45:49 · 218 阅读 · 0 评论 -
LeetCode No.345 Reverse Vowels of a String
LeetCode No.345 Reverse Vowels of a String原创 2016-11-04 12:18:58 · 214 阅读 · 0 评论 -
LeetCode No.124 Binary Tree Maximum Path Sum
LeetCode No.124 Binary Tree Maximum Path Sum原创 2016-11-05 14:17:30 · 254 阅读 · 0 评论 -
LeetCode No.46 Permutations
LeetCode No.46 Permutations原创 2016-11-05 14:37:16 · 297 阅读 · 0 评论 -
LeetCode No.287 Find the Duplicate Number
LeetCode No.287 Find the Duplicate Number原创 2016-11-06 15:23:25 · 302 阅读 · 0 评论 -
LeetCode No.224 Basic Calculator
LeetCode No.224 Basic Calculator原创 2016-11-06 22:41:57 · 310 阅读 · 0 评论 -
LeetCode No.227 Basic Calculator II
LeetCode No.227 Basic Calculator II原创 2016-11-06 22:49:29 · 209 阅读 · 0 评论 -
LeetCode No.349 Intersection of Two Arrays
LeetCode No.349 Intersection of Two Arrays原创 2016-11-07 00:38:40 · 200 阅读 · 0 评论 -
LeetCode No.219 Contains Duplicate II
LeetCode No.219 Contains Duplicate II原创 2016-11-07 00:49:44 · 183 阅读 · 0 评论 -
LeetCode No.109 Convert Sorted List to Binary Search Tree
LeetCode No.109 Convert Sorted List to Binary Search Tree原创 2016-11-08 19:28:43 · 215 阅读 · 0 评论 -
LeeCode No.108 Convert Sorted Array to Binary Search Tree
LeeCode No.108 Convert Sorted Array to Binary Search Tree原创 2016-11-08 19:41:30 · 150 阅读 · 0 评论 -
LeetCode No.423 Reconstruct Original Digits from English
LeetCode No.423 Reconstruct Original Digits from English原创 2016-11-08 20:15:58 · 244 阅读 · 0 评论 -
LeetCode No.382 Linked List Random Nod
LeetCode No.382 Linked List Random Node原创 2016-10-25 22:48:42 · 228 阅读 · 0 评论 -
LeetCode No.437 Path Sum III
LeetCode No.437 Path Sum III原创 2016-10-25 21:25:13 · 399 阅读 · 0 评论 -
LeetCode No.403 Frog Jump
LeetCode No.403 Frog Jump原创 2016-10-25 20:29:38 · 280 阅读 · 0 评论 -
LeetCode No.410 Split Array Largest Sum
LeetCode No.410 Split Array Largest Sum原创 2016-10-19 20:05:36 · 389 阅读 · 0 评论 -
LeetCode No.337 House Robber III
LeetCode No.337 House Robber III原创 2016-10-07 20:48:01 · 360 阅读 · 0 评论 -
LeetCode No.213 House Robber II
LeetCode No.213 House Robber II原创 2016-10-07 20:22:46 · 349 阅读 · 0 评论 -
LeetCode No.198 House Robber
LeetCode No.198 House Robber原创 2016-10-07 20:12:37 · 249 阅读 · 0 评论 -
LeeCode No.205 Isomorphic Strings
LeeCode No.205 Isomorphic Strings原创 2016-10-26 18:14:07 · 222 阅读 · 0 评论 -
LeetCode No.85 Maximal Rectangle
LeetCode No.85 Maximal Rectangle原创 2016-09-25 18:05:23 · 212 阅读 · 0 评论 -
LeetCode No.84 Largest Rectangle in Histogram
LeetCode No.84 Largest Rectangle in Histogram原创 2016-09-25 17:47:18 · 245 阅读 · 0 评论 -
LeetCode No.240 Search a 2D Matrix II
LeetCode No.240 Search a 2D Matrix II原创 2016-09-19 10:56:02 · 458 阅读 · 0 评论 -
LeetCode No.53 Maximum Subarray
LeetCode No.53 Maximum Subarray原创 2016-09-18 23:40:38 · 332 阅读 · 0 评论 -
LeetCode No.389 Find the Difference
LeetCode No.389 Find the Difference原创 2016-09-02 18:50:15 · 281 阅读 · 0 评论 -
LeetCode No.4 Median of Two Sorted Arrays
LeetCode No.4 Median of Two Sorted Arrays原创 2016-09-06 21:49:28 · 383 阅读 · 0 评论 -
LeetCode No.6 ZigZag Conversion
LeetCode No.6 ZigZag Conversion原创 2016-09-06 13:41:39 · 324 阅读 · 0 评论 -
LeetCode No.3 Longest Substring Without Repeating Characters
这道题目属于中等题目,题目大意是:求给定字符串包含的没有重复字符的连续子字符串长度最大值。如果暴力搜索的话复杂度是O(N^2)甚至是O(N^3),我想这样可能都会超时(不然通过率怎么会这么低),所以这就需要一点处理字符的技巧了。用一个长度为256的数组记录其对应ACSII的当前下标最大值,首先都初始化为-1,表示对应的下标还不存在。用i表示当前子字符串的起点下标,j表示当前字符串的终点下标原创 2016-09-02 20:28:19 · 296 阅读 · 0 评论 -
LeetCode No.2 Add Two Numbers
这道题在leetcode中的标签是Medium,题目的大意是给定两个全部由单个数字的构成的反向链表,求两个链表的和。如题案例,342+564=708。这也就是简单的加法模拟,主要难点在于运用链表实现以及一些需要注意的细节。话不多说,附上代码,外带注释。。。/** * Definition for singly-linked list. * struct ListNode { *原创 2016-09-02 18:24:32 · 303 阅读 · 0 评论 -
LeetCode No.1 Two Sum
第一次发博客,纪念一下。。。。。(割)这道理标签是Easy,说明不难,事实也不是很难。题目的大致意思是:给一个整型数组和一个整数,并且这个整数是数组里面唯一的一对整数之和,求这一对整数的下标。正常水的人一般想法就是逐对扫一遍,两重循环,复杂度就是O(N^2)。不过这里没有给出数组的长度,不知道会不会超时,暂且试一下吧,居然能过Orz。。。class Solution {public:原创 2016-09-02 12:01:39 · 210 阅读 · 0 评论 -
LeetCOde No.69 Sqrt(x)
LeetCOde No.69 Sqrt(x)原创 2016-11-09 10:41:19 · 370 阅读 · 0 评论 -
LeeCode No.28 Implement strStr()
LeeCode No.28 Implement strStr()原创 2016-11-09 12:38:34 · 225 阅读 · 0 评论