IDeaS G3 RMS can provide sorted forecast values for analysis. Given a sorted list of integers and a target integer, return the index of the target's first occurrence. Return -1 if the target is not present.
Your solution should use binary search rather than scanning every element.
Implement search_first(nums, target).
nums, a non-decreasing list of integers, and target, an integer.i such that nums[i] == target, or -1 when no such index exists.def search_first(nums, target):