Find Minimum Time Across a Grid
Company: Bytedance
Role: Software Engineer
Category: Coding & Algorithms
Difficulty: medium
Interview Round: Technical Screen
Quick Answer: This question evaluates algorithm design and problem-solving skills related to grid-based reachability with time-dependent constraints, assessing the ability to model traversal feasibility and optimize the earliest feasible arrival time.
Constraints
- Inputs are Python literals matching the function signature.
- Return a deterministic exact-match value.
Examples
Input: ([[0,2],[1,3]],)
Expected Output: 3
Explanation: Bottom-right is reachable at time 3.
Input: ([[0,1,2],[5,4,3],[6,7,8]],)
Expected Output: 8
Explanation: Priority traversal minimizes the maximum cell value on the path.
Input: ([[7]],)
Expected Output: 7
Explanation: Single-cell answer is its own traversable time.
Hints
- This is a minimax path problem.
- Use Dijkstra where path cost is the maximum cell value seen so far.