mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-03-30 18:36:43 +00:00
Added type annotation changes
This commit is contained in:
parent
b8c6beae72
commit
8006d48cac
@ -1,5 +1,4 @@
|
|||||||
import heapq
|
import heapq
|
||||||
from typing import Dict, List
|
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
|
||||||
@ -9,8 +8,8 @@ import sys
|
|||||||
# https://brilliant.org/wiki/johnsons-algorithm/
|
# https://brilliant.org/wiki/johnsons-algorithm/
|
||||||
class JohnsonGraph:
|
class JohnsonGraph:
|
||||||
def __init__(self) -> None:
|
def __init__(self) -> None:
|
||||||
self.edges: List[str] = []
|
self.edges: list[str] = []
|
||||||
self.graph: Dict[str, int] = {}
|
self.graph: dict[str, int] = {}
|
||||||
|
|
||||||
# add vertices for a graph
|
# add vertices for a graph
|
||||||
def add_vertices(self, u) -> None:
|
def add_vertices(self, u) -> None:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user