We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d25e0d5 commit 08b607cCopy full SHA for 08b607c
solution/0228.Summary Ranges/Solution.java
@@ -1,7 +1,7 @@
1
class Solution {
2
public List<String> summaryRanges(int[] nums) {
3
List<String> res = new ArrayList<>();
4
- for (int i = 0, j = 1; i < nums.length; i = j, ++j) {
+ for (int i = 0, j = 1; i < nums.length; i = j++) {
5
while (j < nums.length && nums[j] - nums[j - 1] == 1) {
6
++j;
7
}
0 commit comments