Write an algorithm Delete At Starting Point.

Algorithm:

Delete (node head)
1. [Start]
2. [Check for empty]
If head=null then
Show “List is empty”
Elseif head->next=null then
Node temp=head
Delete temp
Head=null
Else
Node temp=head
Head=temp->next
Delete temp
[End of if else step (2)]
3. [Return]

Leave a Reply

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