Given an integer array nums and an integer target, return the index of the FIRST occurrence of target in nums, or -1 if target is not present. You must implement this recursively, without using any loops.
Input: An integer array nums and an integer target.
Output: Return an integer index (smallest matching) or -1.
Input: [10,20,30,40], 30
Output: 2
Explanation: 30 is at index 2.Input: [1,2,1,2,1], 2
Output: 1
Explanation: First 2 appears at index 1.Input: [5,6,7], 9
Output: -1
Explanation: 9 is not in the array.1 <= nums.length <= 10^4-10^9 <= nums[i] <= 10^9-10^9 <= target <= 10^9