Easy Beginner friendly C++ || Beats 90% +
IntuitionApproachComplexity
Time complexity:

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

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

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

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

# Code
```cpp []
class Solution {
public:
    bool hasSameDigits(string s) {
        string t = s;
        while(t.size() > 2){
            string ans = "";
            for(int i = 0; i<t.size()-1; i++){
               
                int n1 = t[i] - '0';
                int n2 = t[i+1] - '0';

                int res = (n1 + n2) % 10;
                ans.push_back(res + '0');
            }
            t = ans;
        }
        
        return t[0] == t[1];
    }
};
```
['C++']