You are given a number N (10 ≤ N ≤ 2×109). You have to perform exactly two swap operation. You can c…
Click here to read the complete problem statement.
If you need help solving this problem, mention your approach and ask specific questions. Please avoid sharing your code and asking the Community to figure out “what’s wrong”.
The test cases in this problem are not matching the problem statement. The problem specifies that each line will have an integer, but I kept getting RTE in Python. When I parsed the input, not accounting for different lines, it passes. I ended up switching to C++ to solve. Please check the test cases.