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 / codeg
it is not possible in Single AND double linked list without
traversing from first and not knowing addr of 4..
its possible in circular doubly linked list only........
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Discussion on error handling of C++ .
What is a far pointer? where we use it?
If all is successful, what should main return a) 0 b) 1 c) void
How do you flush std cout?
What is a constructor and how is it called?
Why do we use structure in c++?
What are references in c++? What is a local reference?
What is the this pointer?
What is singleton pattern in c++?
Does a derived class inherit or doesn't inherit?
How to defines the function in c++?
Will this c++ program execute or not?
What is the error in the code below and how should it be corrected?
What does namespace mean in c++?
Why c++ does not have finally?