One_Liner's blog

By One_Liner, history, 5 weeks ago, In English

What would be the algorithm of solving the above problem with the help of Dfs and similar approach?

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

»
5 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Well, you could do binary search by d and run DFS to find if it is reachable with such d.

  • »
    »
    5 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Could you explain your method bit more elaborately?

    • »
      »
      »
      5 weeks ago, # ^ |
        Vote: I like it +17 Vote: I do not like it

      Please, specify the question. If you don't know binary search, google it.