特立独行MVP
特立独行MVP
全部文章
LeetCode
c++(13)
剑指offer(19)
技巧(10)
算法(26)
面试(5)
归档
标签
去牛客网
登录
/
注册
Forever 24
十步杀一人 千里不留行
全部文章
/ LeetCode
(共8篇)
97. Interleaving String
Given s1, s2, s3, find whether s3 is formed by the interleaving of s1 and s2. Example 1: Input: s1 = “aabcc”, s2 = “dbbca”, s3 = “aadbbcbcac” Output...
2018-10-14
4
411
股票买卖最大收益总结-Best Time to Buy and Sell Stock
Best Time to Buy and Sell Stock III Say you have an array for which the ith element is the price of a given stock on day i. Design an algorith...
2018-10-13
4
1375
85. Maximal Rectangle
Given a 2D binary matrix filled with 0’s and 1’s, find the largest rectangle containing only 1’s and return its area. Input: [ [“1”,“0”,“1”,“0”,“0...
2018-10-12
4
356
84. Largest Rectangle in Histogram
Given n non-negative integers representing the histogram’s bar height where the width of each bar is 1, find the area of largest rectangle in the hist...
2018-10-12
4
437
42. Trapping Rain Water
42. Trapping Rain Water 参考: LeetCode Monotone Stack Summary 单调栈小结 Given n non-negative integers representing an elevation map where the width ...
2018-10-12
4
408
41. First Missing Positive 分析
Given an unsorted integer array, find the first missing positive integer. For example, Given [1,2,0] return 3, and [3,4,-1,1] return 2. Your algorit...
2018-05-18
3
471
116. Populating Next Right Pointers in Each Node 题解
分析:给出一个完全二叉树,给每个节点的next指针连接向其右边的节点,如果没有右边的节点那么就指向nullptr 附加条件是不能使用额外空间 所以不可以使用自定义的栈空间 可以使用调用栈进行存储 方法1:使用递归的方式,遍历当前层的时候处理好下一层每个节点的next 方法2:迭代方...
2018-05-17
3
393
817. Linked List Components
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * };分析:长度为N的链表 每个节...
2018-04-25
4
451