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
What is the difference between cin.read() and cin.getline()?
What is a NULL Macro? What is the difference between a NULL Pointer and a NULL Macro?
What is decltype c++?
Can we get the value of ios format flags?
Why c++ does not have finally?
Explain terminate() and unexpected() function?
What is the main purpose of overloading operators?
Explain the difference between using macro and inline functions?
Should I learn c or c++ or c#?
What is the difference between reference and pointer?
What is the difference between C and CPP?
Explain how the virtual base class is different from the conventional base classes of the opps.
What is an adjust field format flag?
Why the usage of pointers in C++ is not recommended ?
the first character in the variable name must be an a) special symbol b) number c) alphabet