Given an integer array nums, return true if the array is sorted in non-decreasing order, and false otherwise.
Non-decreasing means each element is less than or equal to the next element.
Input: An integer array nums of length n.
Output: true if the array is non-decreasing, false otherwise.
Input: [1,2,3,4,5]
Output: true
Explanation: 1≤2, 2≤3, 3≤4, 4≤5 — all pairs satisfy non-decreasing order. Return true.Input: [5,4,3,2,1]
Output: false
Explanation: 5 > 4 at positions 0 and 1 — immediately violates the condition. Return false.Input: [1,1,2,2,3]
Output: true
Explanation: 1≤1, 1≤2, 2≤2, 2≤3 — equal elements are allowed. Return true.1 <= nums.length <= 10^5-10^9 <= nums[i] <= 10^9