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