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

Method __init__

matrix/count_islands_in_matrix.py:7–10  ·  view source on GitHub ↗
(self, row: int, col: int, graph: list[list[bool]])

Source from the content-addressed store, hash-verified

5
6class Matrix: # Public class to implement a graph
7 def __init__(self, row: int, col: int, graph: list[list[bool]]) -> None:
8 self.ROW = row
9 self.COL = col
10 self.graph = graph
11
12 def is_safe(self, i: int, j: int, visited: list[list[bool]]) -> bool:
13 return (

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected