Luke Else
5bd95a716f
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
19 lines
270 B
Go
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
|
|
}
|