JPMorganChase interview question

Write a function to insert into a heap.