C++ clear&commented
\nvector<int> numMovesStones(int a, int b, int c) {\n        vector<int> v = {a, b, c};\n        sort(v.begin(), v.end());\n     \n         // in general min_mo
```\nvector<int> numMovesStones(int a, int b, int c) {\n        vector<int> v = {a, b, c};\n        sort(v.begin(), v.end());\n     \n         // in general min_moves is 2, achieved by putting the extremes close to the middle\n        int min_moves = 2;\n        if (v[2] - v[1] <= 2 || v[1] - v[0] <= 2)\n            // if the distance between an extreme point and the middle is <=2,\n\t\t\t// we can put one extreme either next to the middle, or between the other two points\n            min_moves--;\n        if (v[2] - v[1] == 1 && v[1] - v[0] == 1)\n            // all the points were already next to each other\n            min_moves--;\n        \n        // we achieve max_moves by moving extremes to the middle point one step at a time\n        int max_moves = v[2] - v[1] - 1 + v[1] - v[0] - 1;\n        \n        return {min_moves, max_moves};\n    }\n```
[]