[mypy] Fix type annotations for binary tree traversals in data struct… · zinating/algorithms-python@bf6db32 · GitHub
Skip to content

Commit bf6db32

Browse files
dylanbuchipoyea
andauthored
[mypy] Fix type annotations for binary tree traversals in data structures (TheAlgorithms#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>
1 parent 6b6762b commit bf6db32

1 file changed

Lines changed: 92 additions & 66 deletions

File tree

data_structures/binary_tree/binary_tree_traversals.py

Lines changed: 92 additions & 66 deletions

0 commit comments

Comments
 (0)