Driver Code
int main ( ) { int arr [ ] = { 30 , 40 , 2 , 5 , 1 , 7 , 45 , 50 , 8 } ; int n = sizeof ( arr ) / sizeof ( arr [ 0 ] ) ; cout << " Minimum ▁ number ▁ of ▁ deletions ▁ = ▁ " << minimumNumberOfDeletions ( arr , n ) ; return 0 ; }