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,6 @@
|
||||
insert, delete, search, floor, ceiling against java.util.TreeSet (seed 42)
|
||||
==========================================================================
|
||||
|
||||
20000 random steps (10028 inserts, 9972 deletes), checked after every step:
|
||||
inorder equals the TreeSet, isBst is true, recursive and iterative trees have identical shape,
|
||||
search, floor and ceiling give the TreeSet's answers
|
||||
Reference in New Issue
Block a user