HackerEarth Swap It problem solution - TheCScience