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
Pinterest
Coding Question
AI Insights
Quick Summary
Simulate a basic elevator dispatch system based on floor position and movement state.
Filter elevators using strict directional and positional eligibility rules.
Select the closest eligible elevator by absolute distance, breaking ties by original index.
What This Tests
Conditional logic and state evaluation
Linear array traversal and filtering
Absolute distance calculation
Tie-breaking strategies
Common Patterns
Greedy
Collapse
Hint
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