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:
@@ -0,0 +1,13 @@
|
||||
Two broken variants, run
|
||||
========================
|
||||
|
||||
insertLost(root, 45), then search 45: false
|
||||
inorder: [20, 30, 35, 40, 50, 60, 65, 70, 80]
|
||||
|
||||
tree 50,70: Delete.recursive(root, 50) with the result thrown away
|
||||
inorder from the old root variable: [50, 70]
|
||||
root = Delete.recursive(root, 50): [70]
|
||||
|
||||
deleteLeavesDuplicate(sample, 50)
|
||||
inorder: [20, 30, 35, 40, 60, 60, 65, 70, 80]
|
||||
isBst: false
|
||||
Reference in New Issue
Block a user