What is the error in the code? It is running fine for sample input. Following is the link to my code: