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
Do you know what is overriding?
Do you know what are static and dynamic type checking?
Explain how a pointer to function can be declared in C++?
Which is not an ANSII C++ function a) sin() b) tmpnam() c) kbhit()
Difference between inline functions and macros?
What is the use of vtable?
What is a linked list in c++?
What is insertion sorting?
What is null c++?
Describe linkages and types of linkages?
Why is it called c++?
What is a sequence in c++?
What is doubly linked list in c++?
What is using namespace std in cpp?
How one would use switch in a program?