Back to Questions

Maximum Swap

37.4K viewsAsked at Amazon
Medium

Question Explain

Given a non-negative integer, you could swap at most two digits. Return the maximum valued number you can get.

Start Trying This Question Simulation

Practice answering orally or with text to get instant AI feedback.

Practice with This Question