Please read the new rule regarding the restriction on the use of AI tools. ×

Randomized Binary Search Tree

Revision en1, by JasonMendoza2008, 2024-09-25 14:38:50

I saw somewhere that if you were to pick randomly the next element to insert when building a binary search tree from an array, you would have 1/3 on the left and 2/3 on the right (or conversely) on average. I get that the best case is half-half and the worst case in everything in one of the branches but how do get formally to the 1/3-2/3?

Tags help me

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English JasonMendoza2008 2024-09-25 14:38:50 369 Initial revision (published)