3 arrays/deletion at a position/main.cpp
//returns length of array after deletion
returns length of array after deletion
returns length of array after deletion
int deleteElement(int arr[], int n, int ele){
    int pos;
    for(int i=0;i<n;i++){
        if(arr[i] == ele){
            pos = i;
            break;
        }
    }
    for(int i=pos;i<n;i++){
        arr[i] = arr[i+1];
    }
    return n-1;
}
int deleteElement ( int arr [ ] , int n , int ele ) { int pos ; for ( int i = 0 ; i < n ; i ++ ) { if ( arr [ i ] == ele ) { pos = i ; break ; } } for ( int i = pos ; i < n ; i ++ ) { arr [ i ] = arr [ i + 1 ] ; } return n - 1 ; }
returns length of array after deletion
returns length of array after deletion