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 / mpoleg
1) copy content of element 5 to element 4
2) link element 4(which already contains number 5) to
element 6
3) delete element 5
| Is This Answer Correct ? | 10 Yes | 1 No |
Post New Answer View All Answers
What is this weird colon-member (" : ") syntax in the constructor?
What is static in c++?
Explain static and dynamic memory allocation with an example each.
What is the benefit of c++?
How do I get good at c++ programming?
What is microsoft c++ redistributable 2013?
What are static and dynamic type checking?
What do you mean by persistent and non persistent objects?
What is a class definition?
When should overload new operator on a global basis or a class basis?
What is #include cstdlib in c++?
What is the full name of logo?
Write a c program for binary addition of two 8 bit numbers.
what is VOID?
What is iostream in c++ used for?