Given an integer array nums, determine whether it is sorted in non-decreasing order (each element is less than or equal to the next). Return true if it is, false otherwise. You must check this recursively, without loops.
Input: An integer array nums.
Output: Return a boolean: true or false (lowercase).
Input: [1,2,3,4,5]
Output: true
Explanation: Each element <= next -> sorted.Input: [5,4,3,2,1]
Output: false
Explanation: 1 > 2 fails immediately.Input: [1,1,1,1]
Output: true
Explanation: Equal elements are allowed in non-decreasing order.1 <= nums.length <= 10^4-10^9 <= nums[i] <= 10^9