Question about heap sorting algorithm

I am looking at a heap sorting algorithm . I am wondering why this is implemented in a binary tree? Can this use another tree? For example, a tree with three children - node? Or four? With a large number of children, although a little more is required for the removal operation . tree height may be less. I believe that the cost of time should be significantly compared to the binary tree implementation.

+3
source share
2 answers

Wikipedia also shows the difference in cost - only 12%. The height of the tree should decrease depending on log (3) / log (2) ~ = 1.5

. , heapsort satysfying, . .

+1

, , .

0

Source: https://habr.com/ru/post/1768848/


All Articles