Insert and delete max element