Question was same as https://leetcode.com/problems/swim-in-rising-water/ with wordings changed.
Part 1 : Can move only down and right
Part 2 : All 4 directions
Due to part1 of the question, I framed DP solution and after hearing part 2 , I realized it's DFS + Binary Search.
Hell, I got rejected anyways with feedback of not reaching on optimized solution earlier.
All the best to those who are appearing in near future !