We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
im using python , i tried recursion n marking as i recurse, for that i had to build copy of the grid like g2=g1[:]
but the complier isnt reading it and makes the changes in both of them, is it something idk or this complier on hackerearth is faulty??
Does Dijkstra's algorithm solve the problem or is there a more efficient solution?
The explanation in the editorial is incomplete and the complexity for the solution explained is wrong. Please fix the editorial.
im using python , i tried recursion n marking as i recurse, for that i had to build copy of the grid like g2=g1[:] but the complier isnt reading it and makes the changes in both of them, is it something idk or this complier on hackerearth is faulty??
What's approach do I need?