🥇 Beat 100%
Code
# Code
```swift []
class Solution {
    func hasSameDigits(_ s: String) -> Bool {
        var array = s.compactMap(\.wholeNumberValue)
        while array.count > 2 {
            for index in 1..<array.count {
                array[index - 1] = (array[index - 1] + array[index]) % 10
            }
            array.removeLast()
        }
        return array.first == array.last
    }
}
```
['Swift']