摘要: 博客地址:https://www.cnblogs.com/zylyehuo/ # -*- coding: utf-8 -*- class LinkList: class Node: def __init__(self, item=None): self.item = item self.next = 阅读全文
posted @ 2023-08-17 22:48 zylyehuo 阅读(9) 评论(0) 推荐(0) 编辑
摘要: 博客地址:https://www.cnblogs.com/zylyehuo/ # -*- coding: utf-8 -*- class Node: def __init__(self, item): self.item = item self.next = None # 头插法 def creat 阅读全文
posted @ 2023-08-17 15:51 zylyehuo 阅读(4) 评论(0) 推荐(0) 编辑
摘要: 博客地址:https://www.cnblogs.com/zylyehuo/ # -*- coding: utf-8 -*- from collections import deque maze = [ [1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 0, 0, 1, 0, 阅读全文
posted @ 2023-08-17 14:29 zylyehuo 阅读(7) 评论(0) 推荐(0) 编辑
摘要: 博客地址:https://www.cnblogs.com/zylyehuo/ # -*- coding: utf-8 -*- maze = [ [1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 0, 0, 1, 0, 0, 0, 1, 0, 1], [1, 0, 0, 1, 0 阅读全文
posted @ 2023-08-17 13:45 zylyehuo 阅读(16) 评论(0) 推荐(0) 编辑
摘要: 博客地址:https://www.cnblogs.com/zylyehuo/ # -*- coding: utf-8 -*- from collections import deque def tail(n): # n:指定输出文件中最后几行 with open('test.txt', 'r') a 阅读全文
posted @ 2023-08-17 13:26 zylyehuo 阅读(5) 评论(0) 推荐(0) 编辑
摘要: 博客地址:https://www.cnblogs.com/zylyehuo/ # -*- coding: utf-8 -*- from collections import deque q = deque([1,2,3,4,5], 5) q.append(6) # 队尾进队 print(q.popl 阅读全文
posted @ 2023-08-17 13:25 zylyehuo 阅读(6) 评论(0) 推荐(0) 编辑
摘要: 博客地址:https://www.cnblogs.com/zylyehuo/ # -*- coding: utf-8 -*- class Queue: def __init__(self, size=100): self.queue = [0 for _ in range(size)] self.s 阅读全文
posted @ 2023-08-17 13:15 zylyehuo 阅读(5) 评论(0) 推荐(0) 编辑
摘要: 博客地址:https://www.cnblogs.com/zylyehuo/ # -*- coding: utf-8 -*- class Stack: def __init__(self): self.stack = [] def push(self, element): self.stack.ap 阅读全文
posted @ 2023-08-17 12:17 zylyehuo 阅读(6) 评论(0) 推荐(0) 编辑