simple O(1) solution | C++ | 0 ms
\nclass Solution {\npublic:\n    vector<int> numMovesStones(int a, int b, int c) {\n        vector<int> v{a, b, c};\n        sort(v.begin(), v.end());\n        
```\nclass Solution {\npublic:\n    vector<int> numMovesStones(int a, int b, int c) {\n        vector<int> v{a, b, c};\n        sort(v.begin(), v.end());\n        a = v[0];\n        b = v[1];\n        c = v[2];\n        int diff1 = b - a;\n        int diff2 = c - b;\n        int min = -1;\n        if(diff1 == 1 && diff2 == 1)    return {0, 0};\n        if(diff1 <= 2 || diff2 <= 2){\n            min = 1;\n        }\n        min = (min == -1) ? 2 : min;\n        return vector<int>{min, diff1 + diff2 - 2};\n    }\n};\n```
[]