codexaxor's blog

By codexaxor, history, 5 years ago, In English

In this problem I have applied normal DFS technique. But when I got TLE for the first time then I shift all i/o to scanf/printf thought it would be helpful. Then I googled for this problem and there used SCC(strongly connected components) technique. Now I want to know why 2-DFS technique is faster from 1-DFS technique here. Would someone explain this for me. my solution in c++ solution problem link problem on SPOJ

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it