Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

João Pereira NSMyself

🎯
Focusing
Block or report user

Report or block NSMyself

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@NSMyself
NSMyself / graph.swift
Last active Feb 2, 2019
Graph (powered by adjacency lists) - IsTree
View graph.swift
import Foundation
struct Edge<T> where T: Hashable {
var vertex: Vertex<T>
var edges: [Edge<T>] = []
}
struct Vertex<T> where T: Hashable {
let id: Int
let data: T
You can’t perform that action at this time.