algorithms
Write a function solution(arr, target) that performs binary search on a sorted list arr and returns the index of target, or -1 if not found.
Example
solution([1, 3, 5, 7, 9], 5) → 2
solution([1, 3, 5, 7, 9], 6) → -1
solution.py
💡 Tip: Press Ctrl+Enter to run