โ† Royal Bank of Scotland (RBS) questions

Maximum number with K adjacent swaps

Filed under Royal Bank of Scotland (RBS)

The question

For a given number in string format, find the maximum possible number that can be made using at most K adjacent swaps of the digits.

No write-up yet. Related questions below have one.

Related Royal Bank of Scotland (RBS) questions

Collected from public candidate posts and coding forums. Updated Nov 2026.