Given a natural number reorder its digits to create another number, closest to the given one.

Examples:

  • 123 gives 132,
  • 1 gives 10,
  • 1099 gives 991

Solution Stats

232 Solutions

81 Solvers

Last Solution submitted on May 04, 2026

Last 200 Solutions

Problem Comments

Solution Comments

Show comments
Loading...

Problem Recent Solvers81

Suggested Problems

More from this Author40

Problem Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!