There are n people standing in a queue. The age of the ith person is ai. The more the age gap betwee…
Click here to read the complete problem statement.
If you need help solving this problem, mention your approach and ask specific questions. Please avoid sharing your code and asking the Community to figure out “what’s wrong”.