How can I solve this problem in the given link without using nested loop???
Its showing time out with nested loop
Note: Your answer should not be too short.
Please wait a few seconds for the editor to load
Please make sure the answer is not too short