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

Is java a c++?

1104


What is a try block?

1121


Difference between an inspector and a mutator

1393


Can you overload the operator+ for short integers?

1089


How do you flush a buffer in c++?

1149


What is null pointer and void pointer and what is their use?

1155


How should a contructor handle a failure?

1237


Explain class invariant.

1120


What is binary object model?

1098


write a programme to get a character and thier ASCII value

3118


What is a virtual destructor? Explain the use of it?

1033


What are the storage qualifiers?

1220


What does the linker do?

1087


What are the types of array in c++?

1234


Is swift better than c++?

997