Problem link : CodeChef: Practical coding for everyone
Solution link: I1GDPQ - Online C++ Compiler & Debugging Tool - Ideone.com
I am doing simple BFS in the problem but I am getting wrong answer. Please give some test cases or where I am going wrong in the logic part.