Python 3 lines, quardratic solution
IntuitionWe can just simulate step by step where at each step we reduce the number of digits by one.Complexity
Time complexity: O(n2). As each steps takes  O(n)
# Intuition
We can just simulate step by step where at each step we reduce the number of digits by one. 

# Complexity
- Time complexity: $O(n^2)$. As each steps takes  $O(n)$
- Space complexity: $O(n)$

# Code
```python3 []
class Solution:
  def hasSameDigits(self, s: str) -> bool:
    digits = [int(c) for c in s]
    while len(digits) != 2:
      digits = [(digits[i] + digits[i + 1]) % 10 for i in range(len(digits) - 1)]
    
    return digits[0] == digits[1]

        
```
['Python3']