C# || Working solution
Code\n\npublic class Solution\n{\n    public int[] MinReverseOperations(int n, int p, int[] banned, int k)\n    {\n        var bs = new HashSet<int>(banned) { p
# Code\n```\npublic class Solution\n{\n    public int[] MinReverseOperations(int n, int p, int[] banned, int k)\n    {\n        var bs = new HashSet<int>(banned) { p };\n        \n        SortedSet<int>[] choice =\n        {\n            new(Enumerable.Range(0, n).Where(i => i % 2 == 0).Except(bs)),\n            new(Enumerable.Range(0, n).Where(i => i % 2 == 1).Except(bs))\n        };\n\n        IEnumerable<int> Rotate(int pos)\n        {\n            var l = Math.Max(pos - k + 1, 0) * 2 + k - 1 - pos;\n            var r = Math.Min(pos + 1, n - k + 1) * 2 + k - 1 - pos;\n            var currChoice = choice[l % 2];\n            var result = currChoice.GetViewBetween(l, r - 1).ToList();\n            \n            foreach (var i in result)\n                currChoice.Remove(i);\n\n            return result;\n        }\n\n        var bfs = new List<int> { p };\n        var visited = new Dictionary<int, int> { { p, 0 } };\n\n        for (var i = 0; i < bfs.Count; i++)\n        {\n            var vi = visited[bfs[i]] + 1;\n\n            foreach (var j in Rotate(bfs[i]).Where(j => !visited.ContainsKey(j)))\n            {\n                visited[j] = vi;\n                bfs.Add(j);\n            }\n        }\n\n        var result = Enumerable.Repeat(-1, n).ToArray();\n        \n        foreach (var pair in visited)\n            result[pair.Key] = pair.Value;\n\n        return result;\n    }\n}\n\n```
['C#']