![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
数据结构
abigpineapple
这个作者很懒,什么都没留下…
展开
-
python中实现非递归遍历二叉树遇到的问题
利用python实现二叉树的非递归中序遍历时一直遇到便利完成后出现pop空列表的错误,代码如下`# coding:utf-8class Stack(object):“”“栈”""def init(self):self.items = []def is_empty(self): """判断是否为空""" return self.items == []def push(s...原创 2019-09-11 11:23:40 · 362 阅读 · 0 评论 -
python实现快速排序中的一些条件判断问题
先把代码写出来def quick_sort(alist, start, end): if start >= end: return low_index = start high_index = end flag = alist[start] while high_index > low_index: #1 wh...原创 2019-09-12 20:33:45 · 195 阅读 · 0 评论