Skip to content

Practice Check If Digits Are Equal in String After Operations I

Read the task, work through the examples, and check your approach against the constraints. Use the original LeetCode task for coding and submissions.

Easy#3461
LeetCode Problem

Check If Digits Are Equal in String After Operations I

Problem Statement

Given the digit string s, replace it with the sequence formed by adding each adjacent pair of digits modulo 10, preserving their order. Repeat until exactly two digits remain. Return whether those two digits are equal.

Source: Check If Digits Are Equal in String After Operations I on LeetCode. Use the original task for its coding environment and submissions.

Examples

# Example 1

Input
s = "3902"
Output
true

# Example 2

Input
s = "34789"
Output
false

Constraints

3 <= s.length <= 100
s consists of only digits.

Related LeetCode Problems

Practice more problems similar to Check If Digits Are Equal in String After Operations I.

Review your practice with PhantomCodeAI

After trying the problem yourself, use the app to discuss your approach, complexity, and edge cases.