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 / pradeep

its possible only if it is a doubly linked list.

Is This Answer Correct ?    3 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the benefits of pointers?

827


Write about the various sections of the executable image?

791


What is the need of a destructor? Explain with the help of an example.

817


What is else syntax in c++?

902


Is it possible to pass an object of the same class in place of object reference to the copy constructor?

825


What do you mean by translation unit in c++?

1013


What does extern mean in a function declaration in c++?

968


Describe the syntax of single inheritance in C++?

882


How do you remove an element from a set in c++?

864


Can we delete this pointer in c++?

990


Difference between overloaded functions and overridden functions

857


List the types of polymorphism in c++?

875


What is the latest version on c++?

894


What is c++ manipulator?

762


What is object oriented programming (oop)?

904