摘要:
# -*- coding: utf-8 -*-#输入中文要用 class Queue(): def __init__(qu,size):#类比栈 qu.queue=[]; qu.size=size; qu.head=0; qu.tail=0; def Empty(qu): if qu.head==q 阅读全文
摘要:
# -*- coding: utf-8 -*-#输入中文要用 class Stack(): def __init__(st,size):#创建一个栈,用列表 st.stack=[]; st.size=size; st.top=0; def push(st,content):#入栈操作 if st.F 阅读全文