Can we remove an element in a single linked list without
traversing?
Lets suppose the link list is like this
1 2 3 4 5 6

We need to remove 4 from this list (without traversing from
beginning) and the final link list shud be 1 2 3 5 6

only thing we know is the pointer to element "4". How can
we remove "4" and link "3" to "5"?

Answer Posted / santosh patil

just copy elements from 5th to 4th den 6th to 5th n so
on.....at last delete the last node r set it to null

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Define 'std'.

600


How compile and run c++ program in turbo c++?

625


what are Operators and explain with an example?

701


What is the use of :: operator in c++?

593


How do you show the declaration of a virtual constructor?

524






Is c++ an oop?

583


Does c++ have arraylist?

532


How many characters are recognized by ANSI C++?

891


How do I write a c++ program?

590


an integer constant must have atleast one a) character b) digit c) decimal point

552


What is the use of c++ programming language in real life?

558


What are static and dynamic type checking?

605


How to tokenize a string in c++?

600


Can we use clrscr in c++?

526


What apps are written in c++?

601