Summary Ranges

Given a sorted array of unique integers, return the minimal list of ranges that cover all numbers.

Examples
Input: [0,1,2,4,5,7]
Output: ["0->2","4->5","7"]
Hints

Summary Ranges

Given a sorted array of unique integers, return the minimal list of ranges that cover all numbers.