[python] 100%
\n    def numMovesStonesII(self, stones):\n        stones.sort()\n        n,i=len(stones),0\n        for j in range(n):\n            if stones[j]-stones[i]>=n: 
```\n    def numMovesStonesII(self, stones):\n        stones.sort()\n        n,i=len(stones),0\n        for j in range(n):\n            if stones[j]-stones[i]>=n: i+=1\n        return [2 if i==1 and stones[-1]-stones[0]!=n and (stones[-2]-stones[0]==n-2 or stones[-1]-stones[1]==n-2) else i,stones[-1]-stones[0]-n-min(stones[1]-stones[0],stones[-1]-stones[-2])+2]\n```
[]