Microsoft interview question

implement a priority queue