mirror of
https://github.com/krahets/hello-algo.git
synced 2025-12-19 07:17:54 +08:00
refactor: Follow the PEP 585 Typing standard (#439)
* Follow the PEP 585 Typing standard * Update list.py
This commit is contained in:
@@ -1,12 +1,8 @@
|
||||
import copy
|
||||
import math
|
||||
import heapq
|
||||
import queue
|
||||
import random
|
||||
import functools
|
||||
import collections
|
||||
from typing import Optional, Tuple, List, Dict, DefaultDict, OrderedDict, Set, Deque
|
||||
# Follow the PEP 585 – Type Hinting Generics In Standard Collections
|
||||
# https://peps.python.org/pep-0585/
|
||||
from __future__ import annotations
|
||||
# Import common libs here to simplify the codes by `from module import *`
|
||||
from .linked_list import ListNode, list_to_linked_list, linked_list_to_list, get_list_node
|
||||
from .binary_tree import TreeNode, list_to_tree, tree_to_list, get_tree_node
|
||||
from .binary_tree import TreweNode, list_to_tree, tree_to_list, get_tree_node
|
||||
from .vertex import Vertex, vals_to_vets, vets_to_vals
|
||||
from .print_util import print_matrix, print_linked_list, print_tree, print_dict, print_heap
|
||||
from .print_util import print_matrix, print_linked_list, print_tree, print_dict, print_heap
|
||||
|
||||
Reference in New Issue
Block a user