March 2019
Intermediate to advanced
336 pages
9h 9m
English
The CreateLinkedList method creates a linked list of runes from a to z:
// create List methodfunc CreateLinkedList() *Node { var headNode *Node headNode = &Node{nil, 'a'} var currNode *Node currNode = headNode var i rune for i= 'b'; i <= 'z'; i++ { var node *Node node = &Node{nil, i} currNode.nextNode = node currNode = node } return headNode}
The example output for the CreateLinkedList method is shown as follows. The headNode is created with a value of 97. The linked list is created with nodes starting from a to z:

Read now
Unlock full access