Given a sorted unique integer array nums, return the smallest sorted list of ranges that cover all numbers exactly. A range [a,b] is represented as "a->b" and a single number as "a".
Input: Sorted unique integer array nums.
Output: List of range strings.
Input: [0,1,2,4,5,7]
Output: ['0->2','4->5','7']
Explanation: 0,1,2 form range 0->2. 4,5 form 4->5. 7 alone.Input: [0,2,3,4,6,8,9]
Output: ['0','2->4','6','8->9']
Explanation: 0 alone. 2,3,4 form range. 6 alone. 8,9 form range.Input: []
Output: []
Explanation: Empty array.0<=nums.length<=20-2^31<=nums[i]<=2^31-1All values uniqueSorted non-decreasing