2418-sort-the-people
DevGod needs to write a blog entry for this problem!
/**
* @param {string[]} names
* @param {number[]} heights
* @return {string[]}
*/
var sortPeople = function(names, heights) {
const peopleQueue = new MaxPriorityQueue();
for(let I in names){
peopleQueue.enqueue(names[I],heights[I]);
}
return peopleQueue.toArray().map( function(el){return el['element']} );
};