Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
struct LinkedList<T> {
final class Node<T> {
let value: T
init(_ value: T, next: Node<T>? = nil) {
self.value = value
self.next = next
}
var next: Node<T>? = nil
}
var first: Node<T>? = nil
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment