You are given a sorted list of unique integers called numbers.
Your task is to generate the smallest set of continuous ranges that exactly cover all integers in the list.
Each range [a, b] should be represented as:
• "a->b" if a and b are different
• "a" if a and b are the same
The result should be returned as a list of strings, sorted in ascending order according to the input sequence.
Input: numbers = [1, 2, 3, 5, 6, 9]
Output: ["1->3", "5->6", "9"]
Input: numbers = [0, 2, 3, 4, 7, 8, 10]
Output: ["0", "2->4", "7->8", "10"]
Accepted:
Submission: