Algorithm to Insert a Node p at the End of a Linked List is explained below
Step1: [check for space]
If new1= NULL output "OVERFLOW"
And exit
Step2: [Allocate free space] New1 = create new node.
Step3: [Read value of information part of a new
node]
Info[new1]=value
Step4: [Move the pointer to the end of the list]
node = previous=strt
Repeat while Node != NULL Previous=node
Node = Next[Node]
Step5: [Link currently created node with the last node of the list]
Next[New1] = Node
Next[Previous] = New1
Step6: Exit.