Add bst module: recursive and iterative insert/search, three delete cases, BST validation, kth smallest, LCA, floor/ceiling, balance check and 10 problems cross-checked against brute force (25 tests, 16 transcripts)

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017ic4b6vDJ5fWY5uEZaJFNi
This commit is contained in:
Claude
2026-12-03 23:32:04 +05:30
parent 6e5764978f
commit 5419e5057d
36 changed files with 1712 additions and 0 deletions
+14
View File
@@ -0,0 +1,14 @@
kth smallest, k = 4, on the sample tree: stack after each step
==============================================================
push 50 stack (top first) [50]
push 30 stack (top first) [30, 50]
push 20 stack (top first) [20, 30, 50]
pop 20 stack (top first) [30, 50] k left 3
pop 30 stack (top first) [50] k left 2
push 40 stack (top first) [40, 50]
push 35 stack (top first) [35, 40, 50]
pop 35 stack (top first) [40, 50] k left 1
pop 40 stack (top first) [50] k left 0
answer: 40