← Morgan Stanley questions

Maximum even number by swapping digits once

Filed under Morgan Stanley

Given a numeric string representing an initially odd integer, swap any two digits at most (or exactly) once to form the maximum possible even number. If it is impossible to form an even number, return…

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 Morgan Stanley questions

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