New
ML System Design & SQL tracks just landed
See what's new
×
Question Bank
Pricing
Blog
Forum
HOT
Referral
Description
Solution
Discussion
Submissions
Ask AI
Question Bank
Uber
Coding Question
AI Insights
Quick Summary
Find the optimal split point k between elevator use and stair climbing to minimize the absolute time difference.
Elevator time scales linearly with k, while stair time typically decreases as starting energy increases.
Each candidate k requires a simulation of the stair descent to verify energy constraints and compute time.
What This Tests
Monotonicity analysis of discrete functions
Binary search over index ranges
Simulation with early termination
Boundary condition and edge case handling
Common Patterns
Binary Search
Monotonicity
Simulation
Collapse
Hint 1
Hint 2
What Interviewers May Ask Next
Ask AI Assistant
Ask AI Assistant
Ask me anything about this coding question!
Qwen
Qwen3.6-Flash
0/2000
Auto
Debug
Run
Submit
Test Cases
Input
Output
Expected