```
def summaryRanges(self, nums):
"""
:type nums: List[int]
:rtype: List[str]
"""
if not nums: return []
i, j, mn, mx, rList = 0, 1, 0, 0, []
while j < len(nums):
mn, jo = nums[i], j
while j < len(nums) and nums[j-1] + 1 == nums[j]:
mx = nums[j]; j += 1
if jo == j: rList.append(str(mn))
else: rList.append(str(mn)+"->"+str(mx))
i, j = j, j+1
if i < len(nums) and i == j-1: rList.append(str(nums[i]))
return rList
```