This video talks about a CodeChef problem from the March 2015 Long Contest. We understand the problem and develop an efficient algorithm for it.
Detailed explanation of swap cost function: • DEVUCLASS - Cost Function Explanation
Problem Link: http://www.codechef.com/problems/DEVC...
Source Code: https://www.codechef.com/viewsolution...