C# | Simulation
Complexity
Time complexity: O(n2)

Space complexity: O(1)
Code
# Complexity
- Time complexity: $$O(n^2)$$ 
<!-- Add your time complexity here, e.g. $$O(n)$$ -->

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

# Code
```csharp []
public class Solution {
    public bool HasSameDigits(string s) {
        
        while (s.Length != 2)
        {
            string temp = "";
            for (int i = 0; i < s.Length -1; i++)
            {
                temp += (s[i] + s[i+1]) % 10  ;
            }
            
            s = temp; 
        }

        if(s[0] == s[1])
            return true;
        
        return false;
    }
}
```
['Simulation', 'C#']