Discover answers to your questions with Westonci.ca, the leading Q&A platform that connects you with knowledgeable experts. Explore a wealth of knowledge from professionals across different disciplines on our comprehensive platform. Explore comprehensive solutions to your questions from a wide range of professionals on our user-friendly platform.

There is a group of n children standing in a queue, where their ages are listed in the array A[ ]. The children are standing randomly in the queue. Most probably, their ages in the array A[ ] are randomly listed too. For each child, you are required to search for the next older child in the queue and to print the difference of their ages. Print all the outputs in an array Out[ ].