← All problemsSign in

Problem1

Number Mutations Given a number, we can form number mutations in the following ways 1. The digits of the number should be arranged in descending order 2. The digits of the number should be arranged in ascending order 3. The number obtained in (2) must be subtracted from the number obtained in (1) to form a new number 4. Repeat these steps unless the new number has already appeared in a mutation

HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17

CodeSearch Tutor

Hints, not spoilers — it won’t hand over the full solution unless you insist.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start