• + 13 comments

    two line code

        for(i=0;i<(n-1);) 
        arr[i+2]?(res++,i++):(res++,i+=2);        
        cout<<res;