Skip to content

Instantly share code, notes, and snippets.

View JakeLaCombe's full-sized avatar

Jake LaCombe JakeLaCombe

View GitHub Profile
@JakeLaCombe
JakeLaCombe / graph.ts
Created November 24, 2022 18:41
Graph work
interface NodeMapping {
[index: number]: {
[index: number]: string
}
}
class Graph {
private graph: {[index: string]: string[]};
constructor(labels: string[], map: NodeMapping, edges: [number, number][][])
interface Edge {
node: string;
weight: number;
}
class Graph {
public adjList: Map<string, Edge[]>
constructor()