Dataford
Interview QuestionsInterview GuidesExperiencesMock InterviewsPricing
Get started

Optimize Slow Screen Update Pipeline

HardPython00:00
Practice interviewer
In session
5 left
00:00

Your question is Optimize Slow Screen Update Pipeline. Start with the requirements on the right.

Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.

You need to log in / sign up to run or submit.

Problem

Find the minimum number of grid cells needed to reach a target cell from the top-left corner without exceeding a total cost budget. Each move is 4-directional, and entering a cell adds that cell's cost.

Constraints

  • 1 <= rows, cols <= 200
  • 0 <= times[r][c] <= 10^6
  • 0 <= budget <= 10^9
  • Moves allowed: up, down, left, right
Your solutionPython 3
You need to log in / sign up to run or submit.
Run your code to see test output