mirror of
https://github.com/TheAlgorithms/Python.git
synced 2024-11-24 05:21:09 +00:00
Added type annotation for variables
This commit is contained in:
parent
5a87d4fe9e
commit
f80afa35a8
|
@ -1,14 +1,16 @@
|
|||
import heapq
|
||||
from typing import Dict, List
|
||||
import sys
|
||||
|
||||
|
||||
|
||||
# First implementation of johnson algorithm
|
||||
# Steps followed to implement this algorithm is given in the below link:
|
||||
# https://brilliant.org/wiki/johnsons-algorithm/
|
||||
class JohnsonGraph:
|
||||
def __init__(self) -> None:
|
||||
self.edges = []
|
||||
self.graph = {}
|
||||
self.edges: List[str] = []
|
||||
self.graph: Dict[str, int] = {}
|
||||
|
||||
# add vertices for a graph
|
||||
def add_vertices(self, u) -> None:
|
||||
|
|
Loading…
Reference in New Issue
Block a user