Learn Data Structures and Algorithms with Golang
上QQ阅读APP看书,第一时间看更新

The Node class

The Node class has an integer typed variable with the name property. The class has another variable with the name nextNode, which is a node pointer. Linked list will have a set of nodes with integer properties, as follows:

//Node class
type Node struct {
property int
nextNode *Node
}