Binary Heap Builder
Build a binary heap (min or max) by inserting a sequence of numbers one by one with the sift-up operation. Shows the final heap array and its level-by-level structure. The heap is the basis of the priority queue and of heapsort.
Resultado
—
Heap binário
Um heap binário é uma árvore binária quase completa guardada num array, em que todo pai é menor (min-heap) ou maior (max-heap) que seus filhos. Ao inserir, o novo elemento sobe trocando de lugar com o pai até a propriedade do heap ser restaurada (sift-up). É a estrutura por trás da fila de prioridade e do algoritmo de ordenação heapsort, ambos O(n log n). Os índices: o filho de i está em 2i+1 e 2i+2.
Related Tools
Handwriting Generator
Convert typed text into an image with handwriting appearance. Useful for adding a personal touch to digital work.
Resume Generator
Fill a simple printable A4 CV from a form with personal data, education and experience.
Favicon Generator
Generate a favicon from text/emoji in all common sizes (16, 32, 48, 64, 192, 512). PNG download.