[Solved] Closest Friends Contest Problem
There are N persons standing in a line from left to right. This line is represented with an array of size N and the elements of the array are the height of the persons. For each person the closest friend is the…