Given an integer array nums and an integer target, return the index of the FIRST occurrence of target in nums, or -1 if it does not appear. You must implement the search recursively without using any loops.
Input: An integer array nums and an integer target.
Output: Return an integer: the smallest index i such that nums[i] == target, or -1.
Input: [1,2,3,4,5], 3
Output: 2
Explanation: nums[2] = 3, which is the first match.Input: [5,4,3,2,1], 1
Output: 4
Explanation: The value 1 is at index 4.Input: [1,2,3], 4
Output: -1
Explanation: 4 does not appear -> -1.1 <= nums.length <= 10^4-10^9 <= nums[i] <= 10^9-10^9 <= target <= 10^9