Loading...

The Half-Life Search

A medium Python interview practice problem on DataDriven. Write and execute real python code with instant grading.

Domain
Python
Difficulty
medium
Seniority
mid, senior

Problem

Write a function that takes a sorted list of integers and a target value. Return the index of the target using binary search, or -1 if not found. Do not use any built-in search functions.

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.