

from __future__ import annotations






def        UpperCamelCase_(							_snake_case   :  list[int]	):




			"""simple docstring"""






			__a        =len(_snake_case	) // 2

			# choose the middle 3 elements
			__a        =lst[m - 1 : m + 2]

			# if middle element is peak
			if three[1] > three[0] and three[1] > three[2]:
						return three[1]

			# if increasing, recurse on right
			elif three[0] < three[2]:
						if len(lst[:m]	) == 2:
									m -= 1
						return peak(lst[m:]	)

			# decreasing
			else:
						if len(lst[:m]	) == 2:
									m += 1
						return peak(lst[:m]	)


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        UpperCamelCase_(							_snake_case   :  Tuple	):




			"""simple docstring"""






			__a        =[False] * len(_snake_case	)
			__a        =[-1] * len(_snake_case	)

			def dfs(_snake_case   :  Dict       ,     _snake_case   :  Any	):
						__a        =True
						__a        =c
						for u in graph[v]:
									if not visited[u]:
												dfs(_snake_case       ,     1 - c	)

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

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

			return True


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


print(check_bipartite_dfs(graph))






