C++ || Brute Force Solution || 100.00% || Easy to understand
Runtime: 0 ms, faster than 100.00% of C++ online submissions for Moving Stones Until Consecutive.\nMemory Usage: 6.3 MB, less than 78.57% of C++ online submissi
***Runtime: 0 ms, faster than 100.00% of C++ online submissions for Moving Stones Until Consecutive.\nMemory Usage: 6.3 MB, less than 78.57% of C++ online submissions for Moving Stones Until Consecutive.***\n```\nclass Solution {\npublic:\n    vector<int> numMovesStones(int a, int b, int c) {\n        vector<int> nums{a, b, c};\n        sort(nums.begin(),nums.end());\n        if(nums[2] - nums[0] == 2){\n            return {0, 0};   \n        }else{\n            int leftGap = nums[1] - nums[0] - 1;\n            int rightGap = nums[2] - nums[1] - 1;\n            int minMoves = 0;\n            int maxMoves = leftGap + rightGap;\n            if(leftGap < 2 | rightGap < 2){\n                minMoves = 1;\n            }else{\n                minMoves = 2;\n            }\n            return {minMoves, maxMoves};\n        }\n    }\n};\n```
['C', 'C++']