Пожалуйста, прочтите новое правило об ограничении использования AI-инструментов. ×

Randomized Binary Search Tree

Правка en1, от 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?

Теги help me

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский JasonMendoza2008 2024-09-25 14:38:50 369 Initial revision (published)