MCPcopy Create free account
hub / github.com/TheAlgorithms/Python / get_point_key

Function get_point_key

backtracking/word_search.py:36–44  ·  view source on GitHub ↗

Returns the hash key of matrix indexes. >>> get_point_key(10, 20, 1, 0) 200

(len_board: int, len_board_column: int, row: int, column: int)

Source from the content-addressed store, hash-verified

34
35
36def get_point_key(len_board: int, len_board_column: int, row: int, column: int) -> int:
37 """
38 Returns the hash key of matrix indexes.
39
40 >>> get_point_key(10, 20, 1, 0)
41 200
42 """
43
44 return len_board * len_board_column * row + column
45
46
47def exits_word(

Callers 2

exits_wordFunction · 0.85
word_existsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected