摘要: 数据结构之——栈、队列-python代码实现 1、栈 1.1 原理 太简单,略 1.2 python实现栈 """python 列表实现栈""" class Stack(object): def __init__(self): self.stack_list = [] """入栈 压入栈底 即把新的 阅读全文
posted @ 2022-06-19 21:36 JaxonYe 阅读(189) 评论(0) 推荐(0) 编辑
摘要: 图的遍历-深度优先遍历和广度优先遍历-python实现 1、深度优先遍历 1.1 原理 暂时先不写,要画图很麻烦 1.2 python实现深度优先遍历 注:调用的栈类在这个文章:https://www.cnblogs.com/yechangxin/articles/16391518.html # e 阅读全文
posted @ 2022-06-19 11:47 JaxonYe 阅读(683) 评论(0) 推荐(0) 编辑