Forrest_Gump's blog

By Forrest_Gump, history, 3 years ago, In English

I have commented the code at places. I can't understand why the code gives TLE. 1 test case gives TLE.I have tried to optimise it as much as I could but still TLE. Help would be appreciated. I have used breadth first search to solve the problem.The problem

Also what would be worst case complexity?

Code

Full text and comments »

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