from __future__ import absolute_import
from __future__ import division
from __future__ import print_function

class BinaryHeap(object):
    def __init__(self):
        pass


def main():
    pass


if __name__ == '__main__':
    main()


@@ -161,20 +161,597 @@
         
-pass
+# Put single zero as the 1st element, so that %0A        # integer division can be used in later methods.%0A        self.heap_ls = %5B0%5D%0A        self.current_size = 0%0A%0A    def _percolate_up(self, i):%0A        while i // 2 %3E 0:%0A            if self.heap_ls%5Bi%5D %3C self.heap_ls%5Bi // 2%5D:%0A                tmp = self.heap_ls%5Bi // 2%5D%0A                self.heap_ls%5Bi // 2%5D = self.heap_ls%5Bi%5D%0A                self.heap_ls%5Bi%5D = tmp%0A            i = i // 2%0A%0A    def insert(self, new_node):%0A        self.heap_ls.append(new_node)%0A        self.current_size += 1%0A        self._percolate_up(self.current_size)
 %0A%0A%0Adef m

Complete _percolate_up() & insert()