• edited by
1,108 views

1 Answer

0 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
Position:
Show:

Related questions

–1 –1 vote
0 0 answers
588
588 views
Pawan Kumar 2 asked Dec 21, 2017
588 views
Insertion at beginning and end ....both require theta(n) ?
0 0 votes
2 answers 2 answers
1.2k
1.2k views
rishu_darkshadow asked Sep 21, 2017
1,227 views
With regard to linked list, which of the following statement is false ?(A) An algorithm to search for an element in a singly linked list requires 0(n)operations in the wo...
2 2 votes
1 1 answer
1.3k
1.3k views
Souvik33 asked Jan 11, 2023
1,261 views
The following C function rearranges the members of a single-linked list of integers that is passed as a parameter. The list of numbers 1, 2, 3, 4, 5, 6, and 7 in the spec...
0 0 votes
1 1 answer
1.1k
1.1k views
Kalpataru Bose asked Aug 23, 2018
1,054 views
The answer is 'd' will be printed. Can someone draw the linked list after the operations are performed. I think the second operation of the code doesn't bring in any chan...