mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-01-19 00:37:02 +00:00
Added type annotation changes
This commit is contained in:
parent
b8c6beae72
commit
8006d48cac
|
@ -1,5 +1,4 @@
|
|||
import heapq
|
||||
from typing import Dict, List
|
||||
import sys
|
||||
|
||||
|
||||
|
@ -9,8 +8,8 @@ import sys
|
|||
# https://brilliant.org/wiki/johnsons-algorithm/
|
||||
class JohnsonGraph:
|
||||
def __init__(self) -> None:
|
||||
self.edges: List[str] = []
|
||||
self.graph: Dict[str, int] = {}
|
||||
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