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
Define 'std'.
How compile and run c++ program in turbo c++?
what are Operators and explain with an example?
What is the use of :: operator in c++?
How do you show the declaration of a virtual constructor?
Is c++ an oop?
Does c++ have arraylist?
How many characters are recognized by ANSI C++?
How do I write a c++ program?
an integer constant must have atleast one a) character b) digit c) decimal point
What is the use of c++ programming language in real life?
What are static and dynamic type checking?
How to tokenize a string in c++?
Can we use clrscr in c++?
What apps are written in c++?