





SCREAMING_SNAKE_CASE_						       =	{0: [2, 3], 1: [0], 2: [1], 3: [4], 4: []}

SCREAMING_SNAKE_CASE_						       =	{0: [1, 2, 3], 1: [2], 2: [0], 3: [4], 4: [5], 5: [3]}



def        __lowercase       (				_SCREAMING_SNAKE_CASE			,						_SCREAMING_SNAKE_CASE			,						_SCREAMING_SNAKE_CASE     )			->       list[int]:


      '''simple docstring'''


      SCREAMING_SNAKE_CASE		=						True
      SCREAMING_SNAKE_CASE		=						[]

      for neighbour in graph[vert]:
            if not visited[neighbour]:
                  order += topology_sort(_SCREAMING_SNAKE_CASE			,						_SCREAMING_SNAKE_CASE			,						_SCREAMING_SNAKE_CASE     )

      order.append(_SCREAMING_SNAKE_CASE     )

      return order



def        __lowercase       (				_SCREAMING_SNAKE_CASE			,						_SCREAMING_SNAKE_CASE			,						_SCREAMING_SNAKE_CASE     )			->       list[int]:


      '''simple docstring'''


      SCREAMING_SNAKE_CASE		=						True
      SCREAMING_SNAKE_CASE		=						[vert]

      for neighbour in reversed_graph[vert]:
            if not visited[neighbour]:
                  component += find_components(_SCREAMING_SNAKE_CASE			,						_SCREAMING_SNAKE_CASE			,						_SCREAMING_SNAKE_CASE     )

      return component



def        __lowercase       (				_SCREAMING_SNAKE_CASE     )			->       list[list[int]]:


      '''simple docstring'''


      SCREAMING_SNAKE_CASE		=						len(_SCREAMING_SNAKE_CASE     ) * [False]
      SCREAMING_SNAKE_CASE		=						{vert: [] for vert in range(len(_SCREAMING_SNAKE_CASE     )     )}

      for vert, neighbours in graph.items():
            for neighbour in neighbours:
                  reversed_graph[neighbour].append(_SCREAMING_SNAKE_CASE     )

      SCREAMING_SNAKE_CASE		=						[]
      for i, was_visited in enumerate(_SCREAMING_SNAKE_CASE     ):
            if not was_visited:
                  order += topology_sort(_SCREAMING_SNAKE_CASE			,						_SCREAMING_SNAKE_CASE			,						_SCREAMING_SNAKE_CASE     )

      SCREAMING_SNAKE_CASE		=						[]
      SCREAMING_SNAKE_CASE		=						len(_SCREAMING_SNAKE_CASE     ) * [False]

      for i in range(len(_SCREAMING_SNAKE_CASE     )     ):
            SCREAMING_SNAKE_CASE		=						order[len(_SCREAMING_SNAKE_CASE     ) - i - 1]
            if not visited[vert]:
                  SCREAMING_SNAKE_CASE		=						find_components(_SCREAMING_SNAKE_CASE			,						_SCREAMING_SNAKE_CASE			,						_SCREAMING_SNAKE_CASE     )
                  components_list.append(_SCREAMING_SNAKE_CASE     )

      return components_list









from __future__ import annotations



def        __lowercase       (				_SCREAMING_SNAKE_CASE			,						_SCREAMING_SNAKE_CASE     )			->       list[int]:


      '''simple docstring'''


      SCREAMING_SNAKE_CASE		=						0
      SCREAMING_SNAKE_CASE		=						len(_SCREAMING_SNAKE_CASE     ) - 1

      while i < j:
            if nums[i] + nums[j] == target:
                  return [i, j]
            elif nums[i] + nums[j] < target:
                  SCREAMING_SNAKE_CASE		=						i + 1
            else:
                  SCREAMING_SNAKE_CASE		=						j - 1

      return []


if __name__ == "__main__":
      import doctest

      doctest.testmod()
      print(F'''{two_pointer([2, 7, 1_1, 1_5], 9) = }''')


