Can anyone explain how to solve this problem. I understand what we are doing in the code(I saw other peoples solution and the editorial) but not why we are doing it.
Can anyone explain how to solve this problem. I understand what we are doing in the code(I saw other peoples solution and the editorial) but not why we are doing it.