Skip to content

Commit 5baf0e9

Browse files
committed
2 parents 031c3e3 + 70a2b22 commit 5baf0e9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@
2828
Initially I used recursion and this was the biggest mistake since js doesnt support tail optimization. When the data becomes too big with many nested level of data. The browser actually will crash.
2929

3030
Solved by:
31-
-> Instead of using recursion, use iteration.
32-
-> To reference node faster, instead of doing a binary search the entire tree, we use hash map with key as id of the node
33-
-> When update state, instead of creating a new version of the data we use the hashmap to update ( since in js object is referenced not copied )
31+
#### -> Instead of using recursion, use iteration.
32+
#### -> To reference node faster, instead of doing a binary search the entire tree, we use hash map with key as id of the node
33+
#### -> When update state, instead of creating a new version of the data we use the hashmap to update ( since in js object is referenced not copied )
3434

3535
I know this is against data mutation best practice but for performance we must mutate all the way.
3636

0 commit comments

Comments
 (0)