practise to code a min heap class