摘要:
博客地址:https://www.cnblogs.com/zylyehuo/ # -*- coding: utf-8 -*- stuffs = [(60, 10), (100, 20), (120, 30)] # 每个商品元组表示(价格, 重量) stuffs.sort(key=lambda x: 阅读全文
摘要:
博客地址:https://www.cnblogs.com/zylyehuo/ # -*- coding: utf-8 -*- t = [100, 50, 20, 5] def change(t, n): m = [0 for _ in range(len(t))] # m 为各面额纸币的张数 for 阅读全文
摘要:
博客地址:https://www.cnblogs.com/zylyehuo/ bst.py # -*- coding: utf-8 -*- # 构造二叉树 class BiTreeNode: def __init__(self, data): self.data = data self.lchild 阅读全文
摘要:
博客地址:https://www.cnblogs.com/zylyehuo/ # -*- coding: utf-8 -*- # 构造二叉树 class BiTreeNode: def __init__(self, data): self.data = data self.lchild = None 阅读全文
摘要:
博客地址:https://www.cnblogs.com/zylyehuo/ # -*- coding: utf-8 -*- from collections import deque class BiTreeNode: def __init__(self, data): self.data = d 阅读全文
摘要:
博客地址:https://www.cnblogs.com/zylyehuo/ # -*- coding: utf-8 -*- class Node: # 链式存储 def __init__(self, name, type='dir'): self.name = name self.type = t 阅读全文