Maximum Swap at Meta

Medium51.9% acceptance

This problem has 75.0% frequency at Meta.

Problem Description

You are given an integer `num`. You can swap two digits at most once to get the maximum valued number. Return _the maximum valued number you can get_.

Read full problem and hints

Topics

Also asked at 7 companies


More Meta Questions

View all Meta questions