Write an algorithm of Insert At Starting Point.

Algorithm:

Insert (node head, value)
1. [Start]
2. Node temp
Temp->data=value
3. [Check condition]
If head=null then
Head=temp
Else
Node ptr
Ptr=head
Ptr=temp
Temp->next=ptr
[End of if else step (3)]
4. [Return]

Leave a Reply

Your email address will not be published. Required fields are marked *