Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

it is not possible in Single AND double linked list without
traversing from first and not knowing addr of 4..
its possible in circular doubly linked list only........

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Discussion on error handling of C++ .

1165


What is a far pointer? where we use it?

1135


If all is successful, what should main return a) 0 b) 1 c) void

1077


How do you flush std cout?

1151


What is a constructor and how is it called?

1096


Why do we use structure in c++?

1135


What are references in c++? What is a local reference?

1110


What is the this pointer?

1168


What is singleton pattern in c++?

1050


Does a derived class inherit or doesn't inherit?

1126


How to defines the function in c++?

1219


Will this c++ program execute or not?

1162


What is the error in the code below and how should it be corrected?

823


What does namespace mean in c++?

1145


Why c++ does not have finally?

1148