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
2021-10-27 19:18:21 +02:00
2021-03-20 06:49:30 +01:00
2021-10-25 15:59:52 +08:00
2021-10-27 18:30:03 +02:00
2021-09-07 13:37:03 +02:00
2021-06-08 22:49:33 +02:00
2021-10-27 12:25:48 +08:00
2019-11-17 19:37:58 +01:00
2021-02-19 19:15:19 +01:00
2021-09-29 23:34:35 +05:30
2021-10-26 15:13:23 +02:00

The Algorithms - Python

Gitpod Ready-to-Code Contributions Welcome Donate Discord chat Gitter chat
GitHub Workflow Status LGTM pre-commit code style: black

All algorithms implemented in Python - for education

Implementations are for learning purposes only. As they may be less efficient than the implementations in the Python standard library, use them at your discretion.

Getting Started

Read through our Contribution Guidelines before you contribute.

Community Channels

We're on Discord and Gitter! Community channels are great for you to ask questions and get help. Please join us!

List of Algorithms

See our directory for easier navigation and better overview of the project.

Languages
Python 99.9%
Shell 0.1%