I’m trying to solve FIRESC Problem - CodeChef problem.
Im using bfs as opposed to dfs unlike the editorial.
Can someone please help me find where im going wrong?
This is my solution CodeChef: Practical coding for everyone
Im losing my mind over here.(first graph problem)
squal
2
@tacoder:
u did not initialize the boolean array visited to false(it actually had some random values).
just initializing the visited array as false, gets ur solution accepted
working solution: http://www.codechef.com/viewsolution/3236064
Enjoy Coding
1 Like
Thank you, i did initialise the array(fill function) but i did it only upto n, instead of n+1.