Python
第十二讲:二叉树的实现
# -*- coding:utf=8 -*- # 二叉树的实现 # 二叉树的前序遍历 class Node(object): def __init__(self, index): self.index 阅读更多…
# -*- coding:utf=8 -*- # 二叉树的实现 # 二叉树的前序遍历 class Node(object): def __init__(self, index): self.index 阅读更多…
# -*- coding:utf-8 -*- # 队列的实现 class Queue(object): def __init__(self): self.dataList = [] def initQ 阅读更多…
# -*- coding:utf-8 -*- # 文本文件读写 # 读取文件 f = open(“demo.txt”) content = f.read() # 一般不用read读取,防止文件太大 f 阅读更多…