Back to Question

Maximum Swap

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

Click "Start Speaking" and answer the question naturally.