Python/data_structures
Dylan Buchi bf6db32ec2
[mypy] Fix type annotations for binary tree traversals in data structures (#5556)
* [mypy] Fix type annotations for binary tree traversals in data structures

* Change variable name and update level_order_1 to use a deque

Using a deque instead of a list here, because since we are removing from the beginning of the list, the deque will be more efficient.

* remove duplicate function

* Update data_structures/binary_tree/binary_tree_traversals.py

Co-authored-by: John Law <johnlaw.po@gmail.com>

* fix function name at line 137

* Update data_structures/binary_tree/binary_tree_traversals.py

Co-authored-by: John Law <johnlaw.po@gmail.com>

* Update data_structures/binary_tree/binary_tree_traversals.py

Co-authored-by: John Law <johnlaw.po@gmail.com>

* Remove type alias and use the new syntax

* Update data_structures/binary_tree/binary_tree_traversals.py

Co-authored-by: John Law <johnlaw.po@gmail.com>

* Remove prints inside functions and return lists

Co-authored-by: John Law <johnlaw.po@gmail.com>
2021-10-28 22:05:31 +08:00
..
binary_tree [mypy] Fix type annotations for binary tree traversals in data structures (#5556) 2021-10-28 22:05:31 +08:00
disjoint_set Add type annotations (#4814) 2021-10-12 00:34:30 +08:00
hashing Pyupgrade to Python 3.9 (#4718) 2021-09-07 13:37:03 +02:00
heap Pyupgrade to Python 3.9 (#4718) 2021-09-07 13:37:03 +02:00
linked_list [mypy] fix: fix mypy error in singly_linked_list.py (#5517) 2021-10-22 11:39:18 +08:00
queue [mypy] Fix and add type annotations (#5618) 2021-10-27 11:45:33 +08:00
stacks [mypy] Fix type annotations for stack_using_dll.py (#5577) 2021-10-26 21:12:46 +02:00
trie [mypy] Fix type annotations for trie.py (#5022) 2021-10-23 01:21:41 +08:00
__init__.py Add __init__.py files in all the directories (#2503) 2020-09-28 19:42:36 +02:00