Sorted cutoffs are [10, 20, 30, 40]. Print the index where 25 would be inserted to keep the array sorted. searchsorted assumes the array is already sorted.
Data analysis labNumPy problems
Problem 42 of 50 · Order · Medium
Where a new score would sit
Find the insertion index in a sorted array.
Preparing NumPy, Pandas, and MatplotlibShift+Enter runs the cell you are in.
1
Your solution
2