Design an efficient algorithm to solve this problemĀ and analyze the complexity of your solution.
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 […]