refactor: Follow the PEP 585 Typing standard (#439)

* Follow the PEP 585 Typing standard

* Update list.py
This commit is contained in:
Yudong Jin
2023-03-23 18:51:56 +08:00
committed by GitHub
parent f4e01ea32e
commit 8918ec9079
43 changed files with 256 additions and 342 deletions

View File

@ -4,17 +4,15 @@ Created Time: 2022-11-29
Author: Peng Chen (pengchzn@gmail.com)
"""
import sys, os.path as osp
sys.path.append(osp.dirname(osp.dirname(osp.abspath(__file__))))
from modules import *
from collections import deque
""" Driver Code """
if __name__ == "__main__":
if __name__ == "__main__":
""" 初始化队列 """
# 在 Python 中,我们一般将双向队列类 deque 看作队列使用
# 虽然 queue.Queue() 是纯正的队列类,但不太好用
que: Deque[int] = collections.deque()
que: deque[int] = deque()
""" 元素入队 """
que.append(1)