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 / pradeep

its possible only if it is a doubly linked list.

Is This Answer Correct ?    3 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the advantages of c++? Explain

811


Why #include is used?

827


What function initalizes variables in a class: a) Destructor b) Constitutor c) Constructor

923


Evaulate: 22%5 a) 2 b) 4 c) 0

879


What is the c++ programming language used for?

779


What are static and dynamic type checking?

834


What is the equivalent of Pascal's Real a) unsigned int b) float c) char

801


What is struct c++?

771


What is the use of ::(scope resolution operator)?

853


Explain what is class definition in c++ ?

824


If you want to share several functions or variables in several files maitaining the consistency how would you share it?

771


What is singleton pattern in c++?

744


Define private, protected and public access control.

861


What is a breakpoint?

790


Explain explicit container.

864