

# 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 	A       (     snake_case__    ):




			'''simple docstring'''


			SCREAMING_SNAKE_CASE__								=      [False] * len(_A    )
			SCREAMING_SNAKE_CASE__								=      [-1] * len(_A    )

			def dfs(snake_case__		,				snake_case__    ):
						SCREAMING_SNAKE_CASE__								=      True
						SCREAMING_SNAKE_CASE__								=      c
						for u in graph[v]:
									if not visited[u]:
												dfs(_A		,				1 - c    )

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

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

			return True


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




print(check_bipartite_dfs(graph))





"""simple docstring"""




def 	A       (     snake_case__    ):




			'''simple docstring'''


			if not nums:  # Makes sure that the list is not empty
						raise ValueError("""List is empty"""    )

			SCREAMING_SNAKE_CASE__								=      sum(snake_case__    ) / len(snake_case__    )  # Calculate the average
			return sum(abs(x - average    ) for x in nums    ) / len(snake_case__    )


if __name__ == "__main__":
						import doctest

						doctest.testmod()


