class Solution {
public List<List<Integer> > findContinuousSequence(int sum) {
List<List<Integer> > res=new ArrayList<>();
int i=1,j=1,value=0;
while(j<sum){
value+=j;
j++;
while(value>sum){
value-=i;
i++;
}
if(value==sum){
List<Integer>list=new ArrayList<>();
for(int k=i;k<j;k++) list.add(k);
res.add(new ArrayList<>(list));
}
}
return res;
}
}