the right child is clearly less its index is which represents the root index we go ahead and compare our new root node with the value at this indexnow our node has jumped down to index we need to compare it to the lesser of its children howevernow we only have one childso we don' need to worry about which child to compare against (for min heapit is always the lesser child)there is no need to swap here since there are no more rows eitherwe are done notice again howafter the sink(operation is completedour heap adheres to the definition of heap now we can begin implementing this before we do the sink(method itselfnotice how we need to determine which of the children to compare our parent node against welllet us put that selection in its own little methodjust to make the code look little simplerdef minindex(selfk)we may get beyond the end of the listin which case we return the index of the left childif self sizereturn