





"""simple docstring"""







def _a			(		_snake_case							):







      """simple docstring"""






      UpperCAmelCase          =	[False] * len(__lowerCAmelCase							)
      UpperCAmelCase          =	[-1] * len(__lowerCAmelCase							)

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

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

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

      return True


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






print(check_bipartite_dfs(graph))











"""simple docstring"""







from __future__ import annotations

def _a			(		_snake_case				,	_snake_case = None				,	_snake_case = None							):







      """simple docstring"""






      if start is None:
            UpperCAmelCase          =	0

      if end is None:
            UpperCAmelCase          =	len(_snake_case							) - 1

      if start >= end:
            return

      UpperCAmelCase          =	(start + end) // 2

      slowsort(_snake_case				,	_snake_case				,	_snake_case							)
      slowsort(_snake_case				,	mid + 1				,	_snake_case							)

      if sequence[end] < sequence[mid]:
            UpperCAmelCase      , UpperCAmelCase          =	sequence[mid], sequence[end]

      slowsort(_snake_case				,	_snake_case				,	end - 1							)


if __name__ == "__main__":
  from doctest import testmod

  testmod()



