Max Water Level: Find the maximum water level possible while maintaining a valid path from Start to End.
Asked in the Virtual Onsite - Round 1 DSA Coding stage. Solve it by combining graph traversal with binary search on the answer.
def max_water_level(grid):
grid is a 2D list of integers. Return the maximum integer water level L such that there exists a path from the top-left cell to the bottom-right cell using 4-directional moves, and every cell on the path has value at least L.
def max_water_level(grid):