Solved programming question 6

Added propper implementation for min/max heaps