[Solved] Closest Friends Contest Problem
![[Solved] Closest Friends Contest Problem [Solved] Closest Friends Contest Problem](https://realcoder.techss24.com/wp-content/uploads/2022/09/Solved-Closest-Friends-Contest-Problem.png)
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…