edited by
533 views

1 Answer

0 votes
0 votes
Assume we have a pointer " LAST " which point to the last pointer

and we know LAST --> next = NULL

we create a new pointer called NEW and add it to end of LL

so we hv to modify following pointers :

LAST --> next = NEW

NEW  --> prev = LAST

NEW  --> next = NULL

Related questions

–1 votes
–1 votes
0 answers
1
Pawan Kumar 2 asked Dec 21, 2017
293 views
Insertion at beginning and end ....both require theta(n) ?
0 votes
0 votes
1 answer
4