Skip to content

Commit aeac475

Browse files
committed
Last Sync: 2025-07-04 22:32 (Mobile)
1 parent 24210ee commit aeac475

File tree

4 files changed

+263
-118
lines changed

4 files changed

+263
-118
lines changed

data_structures/binary_tree/binary_search_tree.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,11 +91,12 @@
9191

9292
from __future__ import annotations
9393

94+
9495
from collections.abc import Iterable, Iterator
9596
from dataclasses import dataclass
97+
from pprint import pformat
9698
from typing import Any, Self
9799

98-
99100
@dataclass
100101
class Node:
101102
value: int
@@ -115,7 +116,6 @@ def __iter__(self) -> Iterator[int]:
115116
yield from self.right or []
116117

117118
def __repr__(self) -> str:
118-
from pprint import pformat
119119

120120
if self.left is None and self.right is None:
121121
return str(self.value)

data_structures/binary_tree/diff_views_of_binary_tree.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,6 @@ def binary_tree_bottom_side_view(root: TreeNode) -> list[int]:
173173
>>> binary_tree_bottom_side_view(None)
174174
[]
175175
"""
176-
from collections import defaultdict
177176

178177
def breadth_first_search(root: TreeNode, bottom_view: list[int]) -> None:
179178
"""

0 commit comments

Comments
 (0)