Company: Media Net .
Difficulty: medium
Order of People Heights Problem Description n people are queued up one behind another. Every person has a different height. The queue was then scrambled, and all that was recorded about each person is a single number: how many people taller than that person were standing in front of them. You are handed the two lists. heights[i] is a person's height and infronts[i] is that same person's recorded count. Rebuild the queue and report the heights from the front of the queue to the back. The recorded counts always describe a real queue, so an answer always exists, and because the heights are all different the answer is unique. Function Description Complete the order(heights, infronts, n) function. It takes the two lists and their length, and returns the heights in queue order, front first. Input Format The first line contains the integer n . The second line contains n integers, the values of heights . The third line contains n integers, the values of infronts . Output Format Print the n hei