public List<String> summaryRanges(int[] nums) {
		List<String> res = new ArrayList<String>();
		if (nums.length == 0)
			return res;
		int begin = 0, end = 0;
		for (int i = 0; i < nums.length; ++i) {
			if (i < nums.length - 1 && nums[i] + 1 == nums[i + 1]) {
				end = i + 1;
				continue;
			}
			String temp = "";
			if (begin == end) {
				temp += Integer.toString(nums[begin]);
				res.add(temp);
			} else {
				temp += Integer.toString(nums[begin]) + "->"
						+ Integer.toString(nums[end]);
				res.add(temp);
			}
			begin = end = i + 1;
		}
		return res;
	}