Data Structures - Heap (Arabic)

preview_player
Показать описание

Content:
- What is heap?
- Heap properties?
- Insert Element
- Remove Element
- Some notes on heap initialization
- Code
Рекомендации по теме
Комментарии
Автор

6:50: the elements already exist in the array, so what I think he does is just apply the down heapify (reheapification downward) on the elements that are considered as parents nodes which are n//2 elements, and start from down, upward from n//2-1 to 0 heapify each parent with its children to build the heap, .
so the number of steps will decrease by a factor of 2
so I think building the heap would still be O(N*logN) but of course, the running time will decrease.

donfeto