In line 41: if(arr[i] == arr[i - 1]){This code gives error when i=0 then arr[0] == arr[-1] which is incorrect statement.
If you have any doubts, Please let me know
1 Comments
In line 41: if(arr[i] == arr[i - 1]){
ReplyDeleteThis code gives error when i=0 then arr[0] == arr[-1] which is incorrect statement.
If you have any doubts, Please let me know