Python Solution
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```\nfrom bisect import bisect_left, bisect_right\n\nIMPOSSIBLE = -1\nEVEN, ODD = 0, 1\n\nclass Solution:\n    def minReverseOperations(self, N, p, banned, k):\n        if k == 1 or len(banned) == N-1:\n            numOps = [IMPOSSIBLE] * N\n            numOps[p] = 0\n            return numOps\n        \n        numOps = [IMPOSSIBLE] * N\n        numOps[p] = 0\n        \n        remaining = [[], []]\n        banned = set(banned)\n        for pos in range(0, N, 2):\n            if pos != p and pos not in banned:\n                remaining[EVEN].append(pos)\n            pos += 1\n            if pos != p and pos not in banned:\n                remaining[ODD].append(pos)\n        \n        # BFS\n        numOp = 1\n        p0s = [p]\n        while p0s:\n            p1s = []\n            for p0 in p0s:\n                i_lo = max(0, p0+1-k)\n                i_hi = min(N-k, p0)\n                p1_lo = p1_hi = k-1-p0\n                p1_lo += 2*i_lo\n                p1_hi += 2*i_hi\n                parity = p1_lo & 0b1\n                rem = remaining[parity]\n                lo = bisect_left(rem, p1_lo)\n                hi = bisect_right(rem, p1_hi)\n\n                for j in reversed(range(lo, hi)):\n                    p1 = rem.pop(j)\n                    numOps[p1] = numOp\n                    p1s.append(p1)\n            \n            p0s = p1s\n            numOp += 1\n        \n        return numOps\n```
['Python']