corrected the extract min function of heap but made complicated for swaping elements in arraylist without using set function