manas agrawal's submission of How to Minimize a String | CodeChef