public List<String> summaryRanges1(int[] nums) {

		List<String> result = new ArrayList<String>();
		if(nums.length<1)
			return result;
		int start = nums[0];
		int end = 0;
		int i = 0;
		while(i<=nums.length-1){
			if(i+1 == nums.length || nums[i+1] != nums[i]+1 ){
				end = nums[i];
				if(end == start){
					result.add(Integer.toString(start));
				}else{
					String s = Integer.toString(start) + "->" + Integer.toString(end);
					result.add(s);
				}
				if(i <nums.length-1)
					start = nums[i+1];
			}
			i++;
		}
		return result;
	}