mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-05 17:34:49 +08:00
[pre-commit.ci] pre-commit autoupdate (#11473)
* [pre-commit.ci] pre-commit autoupdate updates: - [github.com/astral-sh/ruff-pre-commit: v0.4.10 → v0.5.0](https://github.com/astral-sh/ruff-pre-commit/compare/v0.4.10...v0.5.0) - [github.com/pre-commit/mirrors-mypy: v1.10.0 → v1.10.1](https://github.com/pre-commit/mirrors-mypy/compare/v1.10.0...v1.10.1) * Fix ruff issues * Fix ruff issues --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Christian Clauss <cclauss@me.com>
This commit is contained in:
![66853113+pre-commit-ci[bot]@users.noreply.github.com](/assets/img/avatar_default.png)
committed by
GitHub

parent
6882a8b808
commit
716bdeb68b
@ -36,7 +36,7 @@ def build_tree() -> TreeNode:
|
||||
right_node = TreeNode(int(check))
|
||||
node_found.right = right_node
|
||||
q.put(right_node)
|
||||
raise
|
||||
raise ValueError("Something went wrong")
|
||||
|
||||
|
||||
def pre_order(node: TreeNode) -> None:
|
||||
@ -164,8 +164,8 @@ def level_order_actual(node: TreeNode) -> None:
|
||||
if node_dequeued.right:
|
||||
list_.append(node_dequeued.right)
|
||||
print()
|
||||
for node in list_:
|
||||
q.put(node)
|
||||
for inner_node in list_:
|
||||
q.put(inner_node)
|
||||
|
||||
|
||||
# iteration version
|
||||
|
Reference in New Issue
Block a user