

from __future__ import annotations



class   lowercase_    :



      def __init__(			self      :				str			,					A__      :				str		)    ->     Optional[int]:
        _snake_case						=							vertices
        _snake_case						=							[[0] * vertices for _ in range(_snake_case		)]



      def 						UpperCamelCase_		(			self      :				Any			,					A__      :				List[str]		)    ->     Any:
        print('''Vertex \t Distance from Source'''		)
        for vertex in range(self.vertices		):
          print(_snake_case			,					'''\t\t'''			,					distances_from_source[vertex]		)



      def 						UpperCamelCase_		(			self      :				int			,					A__      :				Optional[int]			,					A__      :				Optional[Any]		)    ->     Any:
        _snake_case						=							1e7
        _snake_case						=							0

        # Search not nearest vertex not in the shortest path tree
        for vertex in range(self.vertices		):
          if distances_from_source[vertex] < minimum and visited[vertex] is False:
            _snake_case						=							distances_from_source[vertex]
            _snake_case						=							vertex
        return min_index







      def 						UpperCamelCase_		(			self      :				List[Any]			,					A__      :				Dict		)    ->     int:
        _snake_case						=							[int(1e7		)] * self.vertices  # distances from the source
        _snake_case						=							0
        _snake_case						=							[False] * self.vertices

        for _ in range(self.vertices		):
          _snake_case						=							self.minimum_distance(_snake_case			,					_snake_case		)
          _snake_case						=							True

          # Update dist value of the adjacent vertices
          # of the picked vertex only if the current
          # distance is greater than new distance and
          # the vertex in not in the shortest path tree
          for v in range(self.vertices		):
            if (
                self.graph[u][v] > 0
                and visited[v] is False
                and distances[v] > distances[u] + self.graph[u][v]
            ):
              _snake_case						=							distances[u] + self.graph[u][v]

        self.print_solution(_snake_case		)


if __name__ == "__main__":
 __A					=	Graph(9)
 __A					=	[
     [0, 4, 0, 0, 0, 0, 0, 8, 0],
     [4, 0, 8, 0, 0, 0, 0, 11, 0],
     [0, 8, 0, 7, 0, 4, 0, 0, 2],
     [0, 0, 7, 0, 9, 14, 0, 0, 0],
     [0, 0, 0, 9, 0, 10, 0, 0, 0],
     [0, 0, 4, 14, 10, 0, 2, 0, 0],
     [0, 0, 0, 0, 0, 2, 0, 1, 6],
     [8, 11, 0, 0, 0, 0, 1, 0, 7],
     [0, 0, 2, 0, 0, 0, 6, 7, 0],
 ]
 graph.dijkstra(0)




'''simple docstring'''
def       a__    (  _SCREAMING_SNAKE_CASE					:    list     ,							_SCREAMING_SNAKE_CASE					:    int							)			-> int:


	"""simple docstring"""





	for index, item in enumerate(_SCREAMING_SNAKE_CASE							):
		if item == target:
			return index
	return -1


def       a__    (  _SCREAMING_SNAKE_CASE					:    list     ,							_SCREAMING_SNAKE_CASE					:    int     ,							_SCREAMING_SNAKE_CASE					:    int     ,							_SCREAMING_SNAKE_CASE					:    int							)			-> int:


	"""simple docstring"""





	if not (0 <= high < len(_SCREAMING_SNAKE_CASE							) and 0 <= low < len(_SCREAMING_SNAKE_CASE							)):
		raise Exception("Invalid upper or lower bound!"							)
	if high < low:
		return -1
	if sequence[low] == target:
		return low
	if sequence[high] == target:
		return high
	return rec_linear_search(_SCREAMING_SNAKE_CASE     ,							low + 1     ,							high - 1     ,							_SCREAMING_SNAKE_CASE							)


if __name__ == "__main__":
					_lowerCamelCase	 =			input("""Enter numbers separated by comma:\n""").strip()
					_lowerCamelCase	 =			[int(item.strip()) for item in user_input.split(""",""")]

					_lowerCamelCase	 =			int(input("""Enter a single number to be found in the list:\n""").strip())
					_lowerCamelCase	 =			linear_search(sequence, target)
					if result != -1:
										print(f"""linear_search({sequence}, {target}) = {result}""")
					else:
										print(f"""{target} was not found in {sequence}""")




