Free written solutionCheck If Digits Are Equal in String After Operations I (LeetCode 3461): Solution and Explanation
Each round replaces neighbouring digit pairs with their sum mod 10, building an upside-down triangle. Simulate it in place until two digits are left and compare them.
Read the intuition, approach, code and complexity →