AdventOfCode2021/shared/Node.go
Luke Else 5bd95a716f day 18a incomplete
was unable to complete the challenge today

Ideally, I would like to wait for generics to release in Go version 1.18 (February 2022)

decided to spend the time working on an implementation of a Binary Search Tree that makes use of the string that is currently stored in the Node Item
2021-12-18 22:09:37 +00:00

19 lines
270 B
Go

package shared
//Waiting for generic types to release,
//this will allow for a Node with a different value type
type Node struct {
Value string
//Universal
Parent *Node
//For LLs, Stacks, Queues...
Next *Node
//For Binary Trees...
Left *Node
Right *Node
}