1033. Moving Stones Until Consecutive
IntuitionApproachComplexity
Time complexity:

Space complexity:
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)$$ -->

- Space complexity:
<!-- Add your space complexity here, e.g. $$O(n)$$ -->

# Code
```python3 []
class Solution:
    def numMovesStones(self, a: int, b: int, c: int) -> List[int]:
        x, y, z = sorted([a, b, c])
        min_moves = 0
        if y - x > 1:
            min_moves += 1
        if z - y > 1:
            min_moves += 1
        if y - x == 2 or z - y == 2:  # Special case where a single move can make them consecutive
            min_moves = 1
        max_moves = (z - y - 1) + (y - x - 1)
        return [min_moves, max_moves]

```
['Python3']