Visualizer extracting the most priority element from the binary heap

About algorithm
  1. Swap first and last element of the heap
  2. Delete last element from heap
  3. Run the sift down process from vertex 1
    • Calculate the min value from left and right son
    • If value in current vertex(from which function is launched) bigger than min of sons,
      swap these values and run function sift down from the lowest son
    • Otherwise heap is balanced
C A N V A S heap array legend