In this tutorial we're going to be going over how we can insert data within our binary heap. The first step is always to insert at the last available position within our heap. The 2nd step depends on whether or not we're implementing a min or max heap. For a minimum heap we compare the data we just inserted, to its parents. If its smaller than the parent, we just swap. We continue to do this, up until the root node. The same is true for a maximum heap, except in reverse. We compare the data we just inserted, to its parent. If its greater than its parent, we swap. We continue to do this, up until the root node.
Nesta página do site você pode assistir ao vídeo on-line Binary Min/Max Heap Insert Overview duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário NoobCoder 30 Março 2019, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 65,819 vezes e gostou 766 espectadores. Boa visualização!