






from collections.abc import Callable


def   lowerCamelCase__			(     lowercase						,     lowercase						,     lowercase				):

  """simple docstring"""






  SCREAMING_SNAKE_CASE       :      float							=    a
  SCREAMING_SNAKE_CASE       :      float							=    b
  if function(lowercase				) == 0:  # one of the a or b is a root for the function
    return a
  elif function(lowercase				) == 0:
    return b
  elif (
      function(lowercase				) * function(lowercase				) > 0
  ):  # if none of these are root and they are both positive or negative,
    # then this algorithm can't find the root
    raise ValueError("could not find root in given interval."				)
  else:
    SCREAMING_SNAKE_CASE       :      float							=    start + (end - start) / 2.0
    while abs(start - mid				) > 10**-7:  # until precisely equals to 10^-7
      if function(lowercase				) == 0:
        return mid
      elif function(lowercase				) * function(lowercase				) < 0:
        SCREAMING_SNAKE_CASE       :      Optional[int]							=    mid
      else:
        SCREAMING_SNAKE_CASE       :      Any							=    mid
      SCREAMING_SNAKE_CASE       :      Optional[Any]							=    start + (end - start) / 2.0
    return mid


def   lowerCamelCase__			(     lowercase				):

  """simple docstring"""






  return x**3 - 2 * x - 5


if __name__ == "__main__":
   print(bisection(f, 1, 1_000))

   import doctest

   doctest.testmod()














def   lowerCamelCase__			(     lowercase				):

  """simple docstring"""






  SCREAMING_SNAKE_CASE       :      Dict							=    [0] * len(lowercase				)
  SCREAMING_SNAKE_CASE       :      List[str]							=    []
  SCREAMING_SNAKE_CASE       :      Optional[Any]							=    []
  SCREAMING_SNAKE_CASE       :      Any							=    0

  for values in graph.values():
    for i in values:
      indegree[i] += 1

  for i in range(len(lowercase				)				):
    if indegree[i] == 0:
      queue.append(lowercase				)

  while queue:
    SCREAMING_SNAKE_CASE       :      Optional[Any]							=    queue.pop(0				)
    cnt += 1
    topo.append(lowercase				)
    for x in graph[vertex]:
      indegree[x] -= 1
      if indegree[x] == 0:
        queue.append(lowercase				)

  if cnt != len(lowercase				):
    print("Cycle exists"				)
  else:
    print(lowercase				)


# Adjacency List of Graph
snake_case    				=		{0: [1, 2], 1: [3], 2: [3], 3: [4, 5], 4: [], 5: []}

topological_sort(graph)






