AI Interview Prep is optimized for larger screens
Please open this on a laptop or desktop (1024px and wider) to use the full editor, whiteboard, and AI coaching surface.
Understand the problem
Restate the problem precisely. Interviewers reward candidates who pause, define the contract, and name the guarantees before coding.
You are a hiker preparing for an upcoming hike. You are given `heights`, a 2D array of size `rows × columns`, where `heights[row][col]` represents the height of cell `(row, col)`. You are situated in the top-left cell, `(0, 0)`, and you hope to travel to the bottom-right cell, `(rows-1, columns-1)`. You can move up, down, left, or right, and you wish to find a route that requires the minimum **effort**. A route's effort is the **maximum absolute difference** in heights between two consecutive cells of the route. Return the minimum effort required to travel from the top-left cell to the bottom-right cell.
Once you've drafted a response, click Submit for AI review and a senior engineer will critique your reasoning.