PracHub
QuestionsPremiumCoachesLearningGuidesInterview Prep
|Home/Coding & Algorithms/Bytedance

Find Minimum Time Across a Grid

Last updated: May 4, 2026

Quick Overview

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.

  • medium
  • Bytedance
  • Coding & Algorithms
  • Software Engineer

Find Minimum Time Across a Grid

Company: Bytedance

Role: Software Engineer

Category: Coding & Algorithms

Difficulty: medium

Interview Round: Technical Screen

You are given an `n x n` grid of non-negative integers. Each value represents the earliest time at which that cell becomes traversable. You start at the top-left cell `(0, 0)` at time `0` and want to reach the bottom-right cell `(n - 1, n - 1)`. At any time `T`, you may stand on or move into a cell only if its value is less than or equal to `T`. You may move one step at a time in the four cardinal directions: up, down, left, and right. Return the minimum time `T` such that there exists a valid path from the top-left corner to the bottom-right corner. Example: - Input: ``` grid = [ [0, 2], [1, 3] ] ``` - Output: `3` Because you cannot enter the bottom-right cell until time `3`, the earliest feasible path is available at `T = 3`. Discuss possible approaches such as priority queue traversal, binary search with reachability checking, or disjoint set union.

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.

Related Interview Questions

  • Reverse Nodes in K-Sized Groups - Bytedance
  • Solve Bracket Matching and Tree Width - Bytedance (hard)
  • Reverse Linked List Groups - Bytedance (medium)
  • Solve Stack and String Shift Problems - Bytedance (medium)
  • Find LCA With Parent Pointers - Bytedance (medium)
Bytedance logo
Bytedance
Mar 18, 2026, 12:00 AM
Software Engineer
Technical Screen
Coding & Algorithms
3
0
Loading...

You are given an n x n grid of non-negative integers. Each value represents the earliest time at which that cell becomes traversable.

You start at the top-left cell (0, 0) at time 0 and want to reach the bottom-right cell (n - 1, n - 1). At any time T, you may stand on or move into a cell only if its value is less than or equal to T. You may move one step at a time in the four cardinal directions: up, down, left, and right.

Return the minimum time T such that there exists a valid path from the top-left corner to the bottom-right corner.

Example:

  • Input:
    grid = [
      [0, 2],
      [1, 3]
    ]
    
  • Output: 3

Because you cannot enter the bottom-right cell until time 3, the earliest feasible path is available at T = 3.

Discuss possible approaches such as priority queue traversal, binary search with reachability checking, or disjoint set union.

Submit Your Answer

Sign in to leave a comment

Loading comments...

Browse More Questions

More Coding & Algorithms•More Bytedance•More Software Engineer•Bytedance Software Engineer•Bytedance Coding & Algorithms•Software Engineer Coding & Algorithms
PracHub

Master your tech interviews with 8,500+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.