SIGN IN SIGN UP
TheAlgorithms / Python UNCLAIMED

All Algorithms implemented in Python

0 0 1 Python

[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>
D
Dylan Buchi committed
bf6db32ec2fb04b6477722f0809c5efef0cad813
Parent: 6b6762b
Committed by GitHub <noreply@github.com> on 10/28/2021, 2:05:31 PM