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,5 @@
|
||||
java.util.TreeSet fed sorted keys, comparisons counted by its Comparator
|
||||
========================================================================
|
||||
|
||||
n = 1023 contains(): worst 18 comparisons, average 9.51 (plain BST on the same input: worst 1023, average 512.0)
|
||||
n = 100000 contains(): worst 31 comparisons, average 16.10 (plain BST on the same input: worst 100000, average 50000.5)
|
||||
Reference in New Issue
Block a user