Simple and easy
Intuition\njust draw it on a paper and check all cases\n\nfor Maximum just fix the position of mid and make sure that at a moment a stone moves a single step\n\
# Intuition\njust draw it on a paper and check all cases\n\nfor Maximum just fix the position of mid and make sure that at a moment a stone moves a single step\n\nfor minimum i have mention the cases in my code just try to draw all of them and you will get the approach.\nThanku if u are reading this ,hope I was able to help you.  \n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\nO(3log3)\nGuess the time complexity will be *constant* as i am just sorting up to get smallest ,midlle and the highest \n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\nsay it O(3) as i constructed one array for sorting abc \n\n# Code\n```\nclass Solution {\npublic:\n    vector<int> numMovesStones(int a, int b, int c) {\n        vector<int>sortin;\n        sortin.push_back(a);\n        sortin.push_back(b);\n        sortin.push_back(c);\n        sort(sortin.begin(),sortin.end());\n        int left =sortin[0];\n        int right=sortin[2];\n        int mid  =sortin[1];\n        vector<int>answer(2);\n        answer[1]=right-left-2;\nif(  right-mid==1 && mid-left==1){\n    answer[0]=0;\n}\nelse if((right-mid==1&& mid-left!=1)||(right-mid!=1 && mid-left==1)){\n    answer[0]=1;\n}\nelse if(right-mid==2 || mid-left==2){\n    answer[0]=1;\n}\nelse {\n    answer[0]=2;\n}\n return answer;\n    }\n};\n```
['C++']