Publicis Sapient Interview Question

Tough question was to write a code for priority queue ?