摘要: 题目描述 定义栈的数据结构,请在该类型中实现一个能够得到栈中所含最小元素的min函数(时间复杂度应为O(1))。 解题思路: 这个题目我们首先拿到的代码如下: # -*- coding:utf-8 -*- class Solution: def push(self, node): #入栈 def p 阅读全文
posted @ 2020-08-12 16:55 Geeksongs 阅读(159) 评论(0) 推荐(0) 编辑

Coded by Geeksongs on Linux

All rights reserved, no one is allowed to pirate or use the document for other purposes.