C++
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 equal(vector<int>& nums){
        int sum = nums[0] + nums[1];
        for(int i = 2; i < nums.size(); i++){
            if(nums[i] + nums[i-1] != sum)
                return false;
        }
        return true;
    }
    bool hasSameDigits(string s) {
        vector<int>Temp;
        for(auto ch : s){
            Temp.push_back(ch - '0');
        }
        while(Temp.size() > 2){
            if(equal(Temp))
                return true;
            for(int i = 1; i < Temp.size(); i++){
                Temp[i-1] = (Temp[i-1] + Temp[i]) % 10;
            }           
            Temp.pop_back();
        }
        return false;
    }
};
```
['C++']