It is about how to choose btw. BFS and DFS. My init thought was to DFS - TLE\MLE. And its editorial gives a very neat BFS based idea which costs much less memory.
https://www.hackerrank.com/challenges/beautiful-path/editorial
2023-10-21 20:55:34
It is about how to choose btw. BFS and DFS. My init thought was to DFS - TLE\MLE. And its editorial gives a very neat BFS based idea which costs much less memory.
https://www.hackerrank.com/challenges/beautiful-path/editorial