Easy to understand , Beats 100 % both memory and time complexity
IntuitionApproachComplexity
Time complexity:O(N)

Space complexity:O(N)
Code
# Intuition
<!-- Describe your first thoughts on how to solve this problem. -->

# Approach
<!-- Describe your approach to solving the problem. -->

# Complexity
- Time complexity:O(N)
<!-- Add your time complexity here, e.g. $$O(n)$$ -->

- Space complexity:O(N)
<!-- Add your space complexity here, e.g. $$O(n)$$ -->

# Code
```python3 []
class Solution:
    def hasSameDigits(self, s: str) -> bool:

        lists = list(s)
        result = []
        i = 0
        while i < len(lists) - 1:
            if len(lists) == 2:
                if lists[0] == lists[1]:
                    return True
                else:
                    return False
            result.append((int(lists[i]) + int(lists[i + 1])) % 10)
            if i == len(lists) - 2:
                lists = result
                result = []
                i = 0
            else:
                i += 1
            


```
['Python3']