Java beats 100%
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```java []\nclass Solution {\n    public int[] numMovesStones(int a, int b, int c) {\n        int[] result = new int[2];\n\n        int max = Math.max(a, Math.max(b,c));\n        int min = Math.min(a, Math.min(b,c));\n\n        int middle = a+b+c-max-min;\n\n        if(max-min > 2) {\n            //max moves = the diff between max and min which is the total gap minus the space occcupied by max and min\n            result[1] = max - min - 2;\n            // minimum number of moves , if the diff between middlestone and max and min is < 3\n            result[0] = ((max-middle < 3) || (middle-min < 3)) ? 1 : 2;\n        }\n        return result;\n    }\n}\n```
['Java']