โ† Intuit questions

Maximum number by doing at most K swaps

Filed under Intuit

Given a string representing a positive integer and an integer K, find the largest number possible by performing at most K swaps of any two digits.

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Intuit questions

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