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
What are the benefits of pointers?
Write about the various sections of the executable image?
What is the need of a destructor? Explain with the help of an example.
What is else syntax in c++?
Is it possible to pass an object of the same class in place of object reference to the copy constructor?
What do you mean by translation unit in c++?
What does extern mean in a function declaration in c++?
Describe the syntax of single inheritance in C++?
How do you remove an element from a set in c++?
Can we delete this pointer in c++?
Difference between overloaded functions and overridden functions
List the types of polymorphism in c++?
What is the latest version on c++?
What is c++ manipulator?
What is object oriented programming (oop)?