Sortedcontainers with details
Intuition\nUsing diffirent approach to find the best Solution.\n\n# Approach\nCheck for the bottle necks, because my main issue was with the tome. \n\n# Complex
# Intuition\nUsing diffirent approach to find the best Solution.\n\n# Approach\nCheck for the bottle necks, because my main issue was with the tome. \n\n# Complexity\n- Time complexity:\nLook for the best approach\n\n- Space complexity:\nTry to write as less operations as possible\n\n# Code\n```\nfrom sortedcontainers import SortedList\n\nclass Solution:\n\n    def minReverseOperations(self, total_nodes, start_point, restricted_nodes, jump):\n        slots = [SortedList(), SortedList()]\n        forbidden = set(restricted_nodes)\n        for idx in range(total_nodes):\n            if idx != start_point and idx not in forbidden:\n                slots[idx & 1].add(idx)\n\n        exploration_list = [start_point]\n        distances = [-1] * total_nodes\n        distances[start_point] = 0\n        \n        for current_node in exploration_list:\n            lower_bound = max(current_node - jump + 1, 0)\n            lower_bound = 2 * lower_bound + jump - 1 - current_node\n            upper_bound = min(current_node + jump - 1, total_nodes - 1) - (jump - 1)\n            upper_bound = 2 * upper_bound + jump - 1 - current_node\n\n            for adjacent in list(slots[lower_bound % 2].irange(lower_bound, upper_bound)):\n                exploration_list.append(adjacent)\n                distances[adjacent] = distances[current_node] + 1\n                slots[lower_bound % 2].remove(adjacent)\n        \n        return distances\n\n```
['Python']