![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
leetcode题目
imagination_
这个作者很懒,什么都没留下…
展开
-
leetcode 496. 下一个更大元素 I
方法一: 简单的遍历 C++: class Solution { public: vector<int> nextGreaterElement(vector<int>& findNums, vector<int>&am原创 2019-01-26 20:59:19 · 219 阅读 · 0 评论 -
leecode 155. 最小栈
Python3: class MinStack: def __init__(self): """ initialize your data structure here. """ self.result =[] def push(self, x): """ :type x: int ...原创 2019-01-27 22:55:44 · 188 阅读 · 0 评论 -
leetcode225. 用队列实现栈
java: 在java中用linkedlist来实现队列 此题用队列来实现栈只需要在push时将顺序倒过来就可作为栈使用 class MyStack { Queue<Integer>queone; /** Initialize your data structure here. */ public MyStack() { ...原创 2019-01-28 22:44:13 · 119 阅读 · 0 评论