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.
En esta página del sitio puede ver el video en línea Binary Min/Max Heap Insert Overview de Duración hora minuto segunda en buena calidad , que subió el usuario NoobCoder 30 marzo 2019, comparta el enlace con amigos y conocidos, en youtube este video ya ha sido visto 65,819 veces y le gustó 766 a los espectadores. Disfruta viendo!