Suppose you are the owner of the bank. There is a long queue outside the bank and the weather is really hot. The old aged persons can’t wait long for their turn. As an owner of bank, you asked the first member in the queue to swap with the second person if he has age greater than him similarly it goes till 10 persons. You can randomly give age to 10 persons (make sure that the queue was arranged…