Implement functions that search a sorted array without scanning it. insertion_points returns where values would be inserted to keep the order, count_between counts how many elements lie in a closed range using two such searches, bucketize assigns every value to the interval between consecutive edges, nearest_value returns the element closest to a target, and is_present tests membership. All of them must be vectorised (no Python loop over the values).
No results yet
Run your code to check it against the examples, or submit to run every test.