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

What is lambda in c++?

1125


What is the main function c++?

1069


When can I use a forward declaration?

1033


What is a binary file? List the merits and demerits of the binary file usagein C++.

1232


How important is c++?

925


Explain what is oop?

1008


What is virtual destructor ans explain its use?

1072


Can notepad ++ run c++?

1004


What is std :: flush?

1003


Explain what are mutator methods in c++?

1066


Are vectors faster than arrays?

958


C is to C++ as 1 is to a) What the heck b) 2 c) 10

1006


Write about c++ storage classes?

1150


How const int *ourpointer differs from int const *ourpointer?

1067


Explain the static storage classes in c++.

1195