Driver program to test above
int main ( ) { int arr [ ] = { 1 , 4 , 5 , 9 , 1 } ; int n = sizeof ( arr ) / sizeof ( arr [ 0 ] ) ; cout << " Count ▁ of ▁ minimum ▁ operations ▁ is ▁ " << findMinOps ( arr , n ) << endl ; return 0 ; }