Monday, August 1, 2016

Summary Ranges

Given a sorted integer array without duplicates, return the summary of its ranges for consecutive numbers.

For example, given [0,1,2,4,5,7], return ["0->2","4->5","7"].

http://www.programcreek.com/2014/07/leetcode-summary-ranges-java/

No comments:

Post a Comment