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 / santosh patil
just copy elements from 5th to 4th den 6th to 5th n so
on.....at last delete the last node r set it to null
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is lambda in c++?
What is the main function c++?
When can I use a forward declaration?
What is a binary file? List the merits and demerits of the binary file usagein C++.
How important is c++?
Explain what is oop?
What is virtual destructor ans explain its use?
Can notepad ++ run c++?
What is std :: flush?
Explain what are mutator methods in c++?
Are vectors faster than arrays?
C is to C++ as 1 is to a) What the heck b) 2 c) 10
Write about c++ storage classes?
How const int *ourpointer differs from int const *ourpointer?
Explain the static storage classes in c++.