Generic min heap