Last active
August 2, 2018 05:53
-
-
Save laevandus/96b7248bb9cd22d4743147c0264f4412 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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