https://practice.geeksforgeeks.org/problems/swap-and-maximize/0