Skip to content

Commit 4494a1d

Browse files
committed
add algo of recursively drawing tree
1 parent 173dd8f commit 4494a1d

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,15 @@ Don't just run your test cases through your mind, visualize them instead! 😉
2828

2929
![coordinates](https://github.com/subrat611/leetcode-tree-visualizer/assets/77252075/b8185588-79f5-4c16-a1cb-8bf7904e397d)
3030

31+
### Draw tree recursively
32+
33+
#### Algorithm
34+
35+
- Find the root node coordinates from `xStart` to `xEnd`.
36+
- Draw the root node on the coordinates found at `step 1`.
37+
- Recursively draw left & right nodes.
38+
- Connect edges of each nodes.
39+
3140
### 🔨 Technologies
3241

3342
- `Vitejs` + `TypeScript`

0 commit comments

Comments
 (0)