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


Please Help Members By Posting Answers For Below Questions

State two differences between C and C++.

1114


Is map thread safe c++?

1037


What is the best way to take screenshots of a window with c++ in windows?

1017


Write a program to find the Fibonacci series recursively.

1041


What do you mean by “this” pointer?

1051


What is a node class in c++?

1038


What is endianness?

1055


What operators can you overload in c++?

1016


Why do we learn c++?

927


What is a responder chain?

1031


Why can’t you call invariants() as the first line of your constructor?

985


why is c++ called oops? Explain

1001


Search for: what is pair in c++?

1085


What is a static member?

1010


Why do we use the using declaration?

1135