Driver program to test above
int main ( ) { string num = "218765" ; cout << " Original ▁ number : ▁ " << num << endl ; cout << " Next ▁ higher ▁ number : ▁ " << nxtHighUsingAtMostOneSwap ( num ) ; return 0 ; }