startedMutation
to False
to track if the mutation has started.num
using an index i
.change
array.startedMutation
is False
, set startedMutation
to True
.startedMutation
is True
, replace the current digit with the mapped digit.startedMutation
is True
, break the loop as the mutation should end.