C++!!
\tclass Solution {\n\tpublic:\n\t\tvector numMovesStones(int a, int b, int c) {\n\t\t\tvector stones = {a, b , c};\n\t\t\tsort(stones.begin(), stones.end());\n\
\tclass Solution {\n\tpublic:\n\t\tvector<int> numMovesStones(int a, int b, int c) {\n\t\t\tvector<int> stones = {a, b , c};\n\t\t\tsort(stones.begin(), stones.end());\n\n\t\t\tint diff1 = stones[1] - stones[0], diff2 = stones[2] - stones[1];\n\t\t\tint min_moves = (diff1== 1) + (diff2 == 1);\n\n\t\t\tif(min_moves == 2) {\n\t\t\t\tmin_moves = 0;\n\t\t\t} else if (min_moves != 1) {\n\t\t\t\tif(diff1 == 2 || diff2 == 2)\n\t\t\t\t\tmin_moves = 1;\n\t\t\t\telse\n\t\t\t\t\tmin_moves = 2;\n\t\t\t}\n\t\t\tint max_moves = ((diff1 > 1 ? diff1 - 1 : 0) + (diff2 > 1 ? diff2 - 1 : 0));\n\n\t\t\treturn {min_moves, max_moves};\n\t\t}\n\t};
[]