Skip to content

Instantly share code, notes, and snippets.

@RinniSwift
Last active January 20, 2021 02:54
Show Gist options
  • Save RinniSwift/8c4b8795d6aed0d3d4bb95711b007176 to your computer and use it in GitHub Desktop.
Save RinniSwift/8c4b8795d6aed0d3d4bb95711b007176 to your computer and use it in GitHub Desktop.
/// A Node class to represent data objects in the LinkedList class
class Node<T: Payload> {
var payload: T
var previous: Node<T>?
var next: Node<T>?
init(value: T) {
self.payload = value
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment