6 Star 9 Fork 2

Gitee 极速下载 / DAIN

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/baowenbo/DAIN
克隆/下载
Stack.py 471 Bytes
一键复制 编辑 原始数据 按行查看 历史
wenbobao 提交于 2019-03-22 00:21 . remove src/ dir
class Stack:
def __init__(self):
self.stack = []
def pop(self):
if self.is_empty():
return None
else:
return self.stack.pop()
def push(self,val):
return self.stack.append(val)
def peak(self):
if self.is_empty():
return None
else:
return self.stack[-1]
def size(self):
return len(self.stack)
def is_empty(self):
return self.size() == 0
Python
1
https://gitee.com/mirrors/DAIN.git
git@gitee.com:mirrors/DAIN.git
mirrors
DAIN
DAIN
master

搜索帮助