MCPcopy Create free account
hub / github.com/Reaper622/DataStructure-Algorithm-TS / MinStack

Class MinStack

DataStructure/Stack/MinStack.ts:8–59  ·  view source on GitHub ↗

* 设计一个支持 push,pop,top 操作,并能在常数时间内检索到最小元素的栈。 * push(x) -- 将元素 x 推入栈中。 * pop() -- 删除栈顶的元素。 * top() -- 获取栈顶元素。 * getMin() -- 检索栈中的最小元素。

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected