3ms Runtime || BEATS 100% || C++
IntuitionKeep adding adjacent digits and taking their last digit until we either find same adjacent digits or end up with a single digit.Approach
While string l
# Intuition
Keep adding adjacent digits and taking their last digit until we either find same adjacent digits or end up with a single digit.

# Approach

1. While string length > 1:

- For length 2: check if both digits same
- Add adjacent digits, keep last digit only
- Form new string with these sums
- Repeat until no more reduction possible

Example 
```
"12345" → "3579" → "826" → "08" → "8"
Return false (single digit left)
```

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

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

# Code
```cpp []
class Solution {
public:
    bool hasSameDigits(string s) {
        while(s.size()>1){
            if(s.size()==2){
                if(s[0]==s[1]) return true;
            }
            string temp;
            for(int i=0; i<s.size()-1; i++){
                temp+=(s[i]-'0'+s[i+1]-'0')%10;
            }
            s=temp;
        }
        return false;
        
    }
};
```
['Hash Table', 'String', 'C++']