FIRESC solution not working

So I sat down to plunge myself into graphs.

The code below is 99% copy-paste of the code posted by @kuruma in the above post. Yet, it reports FIRESC.exe has stopped working as soon as I enter the inputs for the 1st test case. But the code in the above link works fine (obviously!).

I’ve compared the codes repeatedly and spent hours debugging and trying to figure out the cause of the mishap. But to no avail. Could anyone out there please help me out?

You may laugh at the mistake :stuck_out_tongue:

In line 12 you have used equality check instead of assignment operator.

instead of 
1 Like

I didn’t laugh, I cried at the mistake :stuck_out_tongue: I spent suchhhh a loooong time, hours trying to find the error! :open_mouth: I thought I hadn’t understood dfs and hence it wasn’t working. Thank you soo much for answering even though the error was stupid. :stuck_out_tongue: