Temple Darshan Queue Slot Finder
Temple Darshan Queue Slot Finder
MediumBinary Search100% accepted
Priya arrives at a Mumbai temple and needs to find her darshan slot. The temple has scheduled slots with different waiting times, and she needs to find her slot based on arrival time.
Approach
Given an array of slot start times and arrival time, find the slot index where the darshan time equals the arrival time.
Input
slots=[600, 700, 800, 900, 1000], arrival=850
Output
-1
More Binary Search problems
Browse all coding problems →solution.py
Loading editor...
Test 1
Test 2
Test 3
Press Run to test your custom input, or Submit to judge against all test cases.
Sign in to continue
Create a free account to run code, submit solutions and track progress.
- Free forever — no credit card
- 10+ languages with live execution
- Points, streaks & leaderboards