very easy solution
IntuitionApproachComplexity
Time complexity:
O(1)
Space complexity:
O(1)Code
# Intuition
<!-- Describe your first thoughts on how to solve this problem. -->

# Approach
<!-- Describe your approach to solving the problem. -->

# Complexity
- Time complexity:
<!-- Add your time complexity here, e.g. $$O(n)$$ -->
O(1)
- Space complexity:
<!-- Add your space complexity here, e.g. $$O(n)$$ -->
O(1)
# Code
```java []
class Solution {
    public int[] numMovesStones(int a, int b, int c) {
       int[] arr=new int[2];
        if(b>a && b>c){
           if(a>c)func( arr,c,a,b);
           else func(arr,a,c,b);
        }
        else if(c>a && c>b){
            if(b>a)func(arr,a,b,c);
           else func(arr,b,a,c);
        }
        else{
            if(b>c)func(arr,c,b,a);
           else func(arr,b,c,a);
        }
        return arr;
    }
    static void func(int[] arr,int x, int y, int z){
        int max=((z-y)-1)+((y-x)-1);
        int min;
        if((z-y)-1>=2 && (y-x)-1>=2)min=2;
        else if((z-y)-1>=1|| (y-x)-1>=1)min=1;
        else{min=0;}
         arr[0] =min;
         arr[1]=max;
    }
}
```
['Math', 'Java']