March 2019
Intermediate to advanced
336 pages
9h 9m
English
The AddAfter method adds a node after a specific node to a double linked list. The AddAfter method of the double LinkedList class searches the node whose value is equal to nodeProperty. The found node is set as the previousNode of the node that was added with property. The nextNode of the added node will be the nodeWith property's nextNode. The previousNode of the added node will be the node that was found with value equal to nodeProperty. The nodeWith node will be updated to the current node. In the following code, the AddAfter method is shown:
//AddAfter method of LinkedListfunc (linkedList *LinkedList) AddAfter(nodeProperty int,property int) { var node = &Node{} node.property = property node.nextNode = nil var nodeWith ...Read now
Unlock full access