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
This commit is contained in:
+13
-1
@@ -1,6 +1,18 @@
|
||||
package shared
|
||||
|
||||
//Waiting for generic types to release,
|
||||
//this will allow for a Node with a different value type
|
||||
|
||||
type Node struct {
|
||||
Value string
|
||||
Next *Node
|
||||
|
||||
//Universal
|
||||
Parent *Node
|
||||
|
||||
//For LLs, Stacks, Queues...
|
||||
Next *Node
|
||||
|
||||
//For Binary Trees...
|
||||
Left *Node
|
||||
Right *Node
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user