Here is the video link where I have discussed the algorithm for this question in the best possible time complexity : Under The Tunnels | CodeChef Jan Lunchtime Solution | Algorithm and Code Explanation by alGOds!! - YouTube
Please go through it and do like and share if u find it helpful
4 Likes
Very nice explanation:heart:
1 Like