Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions DOUBLY.CPP
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,11 @@ void linklist::addtohead(int ele)
{
head=new node(ele,head,0);
if(tail!=0)
{
head->next->prev=head;
}
else
{
tail=head;
}
head->next->prev=head;

else //tail will be head otherwise
tail=head;

}
int linklist::deletefromhead()
{
Expand Down