标签:public empty key tle 复杂度 title 定义 ble dex
定义栈的数据结构,请在该类型中实现一个能够得到栈中所含最小元素的min函数(时间复杂度应为O(1))。
We need another data structure to sotre the min list.(Use stack may be the best way)
1 | public class MinStack { |
Coding Interviews 20 包含min函数的栈
标签:public empty key tle 复杂度 title 定义 ble dex
原文地址:https://www.cnblogs.com/lijianming180/p/12258872.html