Loading...
The Silent Locator
A easy Python interview practice problem on DataDriven. Write and execute real python code with instant grading.
- Domain
- Python
- Difficulty
- easy
- Seniority
- junior, mid
Problem
We need an efficient lookup function for a sorted catalog of integers. Without using any library search utilities, write a function that returns the position of a target value in the list, or -1 if it is not present. The solution must scale to very large catalogs.
Practice This Problem
Solve this Python problem with real code execution. DataDriven runs your Python code in a sandboxed Docker environment and grades it instantly.