Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/codemistic/Data-Structures-and-Algorithms
/ get_opposite_index
Function
get_opposite_index
Python/dijkstra.py:27–28 ·
view source on GitHub ↗
(index)
Source
from the content-addressed store, hash-verified
25
26
# the opposite direction's index
27
def
get_opposite_index(index):
28
return
[2, 3, 0, 1][index]
29
30
def
get_direction(index):
31
return
[
"north"
,
"east"
,
"south"
,
"west"
][index]
Callers
1
escape_route
Function · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected