Available question text
Find the minimum total cost to transform integer n into m by repeatedly incrementing or decrementing any single digit by 1 (digits remain same length), where each visited number contributes its numeric value to the cost and any prime-valued intermediate state (including start) is forbidden; return -1 if no valid sequence exists.
Related questions
Continue with questions that share topics or the same question type.
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
No company association
Leetcode 3377. Digit Operations to Make Two Integers Equal
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source