enter image description here > this is giing arrayIndexOutOfBound Exception
** for(int i=0; i< arr.length; i++){
start =0;
if((arr[i]==arr[i-1]) && i>0){
start = end+1;
}
end = outer.size()-1;**
> This is working
`for(int i=0; i< arr.length; i++){
start =0;
if(i>0 && (arr[i]==arr[i-1]) ){
start = end+1;
}
end = outer.size()-1;
`