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
State two differences between C and C++.
Is map thread safe c++?
What is the best way to take screenshots of a window with c++ in windows?
Write a program to find the Fibonacci series recursively.
What do you mean by “this” pointer?
What is a node class in c++?
What is endianness?
What operators can you overload in c++?
Why do we learn c++?
What is a responder chain?
Why can’t you call invariants() as the first line of your constructor?
why is c++ called oops? Explain
Search for: what is pair in c++?
What is a static member?
Why do we use the using declaration?