- Learn Data Structures and Algorithms with Golang
- Bhagvan Kommadi
- 54字
- 2021-06-24 15:37:45
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
}