



def       lowercase       (   SCREAMING_SNAKE_CASE__       :	list[list[int | float]]				)  ->     int:
 _snake_case    :  Dict					=					len(SCREAMING_SNAKE_CASE__				)
 _snake_case    :  Union[str, Any]					=					len(matrix[0]				)
 _snake_case    :  Tuple					=					min(SCREAMING_SNAKE_CASE__				,       SCREAMING_SNAKE_CASE__				)

 for row in range(SCREAMING_SNAKE_CASE__				):
  # Check if diagonal element is not zero
  if matrix[row][row] != 0:
   # Eliminate all the elements below the diagonal
   for col in range(row + 1				,       SCREAMING_SNAKE_CASE__				):
    _snake_case    :  List[str]					=					matrix[col][row] / matrix[row][row]
    for i in range(SCREAMING_SNAKE_CASE__				,       SCREAMING_SNAKE_CASE__				):
     matrix[col][i] -= multiplier * matrix[row][i]
  else:
   # Find a non-zero diagonal element to swap rows
   _snake_case    :  int					=					True
   for i in range(row + 1				,       SCREAMING_SNAKE_CASE__				):
    if matrix[i][row] != 0:
     _snake_case	,    _snake_case    :  List[str]					=					matrix[i], matrix[row]
     _snake_case    :  int					=					False
     break
   if reduce:
    rank -= 1
    for i in range(SCREAMING_SNAKE_CASE__				):
     _snake_case    :  Optional[int]					=					matrix[i][rank]

            # Reduce the row pointer by one to stay on the same row
   row -= 1

 return rank


if __name__ == "__main__":
  import doctest

  doctest.testmod()





# A Bipartite Graph is a graph whose vertices can be divided into two independent sets,
# U and V such that every edge (u, v) either connects a vertex from U to V or a vertex
# from V to U. In other words, for every edge (u, v), either u belongs to U and v to V,
# or u belongs to V and v to U. We can also say that there is no edge that connects
# vertices of same set.



def       lowercase       (   SCREAMING_SNAKE_CASE__       :	Dict				)  ->     Union[str, Any]:
 _snake_case    :  str					=					[False] * len(SCREAMING_SNAKE_CASE__				)
 _snake_case    :  Dict					=					[-1] * len(SCREAMING_SNAKE_CASE__				)

 def dfs(SCREAMING_SNAKE_CASE__       :	Optional[int]				,       SCREAMING_SNAKE_CASE__       :	Union[str, Any]				):
  _snake_case    :  Optional[Any]					=					True
  _snake_case    :  Tuple					=					c
  for u in graph[v]:
   if not visited[u]:
    dfs(SCREAMING_SNAKE_CASE__				,       1 - c				)

 for i in range(len(SCREAMING_SNAKE_CASE__				)				):
  if not visited[i]:
   dfs(SCREAMING_SNAKE_CASE__				,       0				)

 for i in range(len(SCREAMING_SNAKE_CASE__				)				):
  for j in graph[i]:
   if color[i] == color[j]:
    return False

 return True


# Adjacency list of graph
a__    =	{0: [1, 3], 1: [0, 2], 2: [1, 3], 3: [0, 2], 4: []}

print(check_bipartite_dfs(graph))
