Welcome to the Python screen.
The question is on your right: Binary Search in Sorted Array. Read through the requirements first.
Run and submit your code as often as you need. You also have five interviewer messages this session - want to talk through your approach, or are you ready to start coding?
At Stripe, a service stores sorted numeric IDs in memory and needs fast lookups. Implement binary search to find the index of a target value in a sorted array.
Given a sorted list of integers nums in ascending order and an integer target, return the index of target if it exists. Otherwise, return -1.
nums (list of integers sorted in ascending order), target (integer)target, or -1 if not founddef binary_search(nums, target):