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

Memory address of all elements in a linked list are not
continuous. So if we only know the memory address of the
element "4", we cannot know memory address of element "3"
and "5" without traversing. And we cannot remove it from the
linked list.

Is This Answer Correct ?    1 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you declare A pointer to a function which receives nothing and returns nothing

1235


Why can templates only be implemented in the header file?

1107


Can you please explain the difference between overloading and overriding?

1108


Is java made in c++?

1066


What is the difference between a type-specific template friend class and a general template friend class?

981


What is using namespace std in cpp?

1161


How does work in c++?

1078


How can you create a virtual copy constructor?

1085


Explain the use of virtual destructor?

1079


What is public, protected, private in c++?

1154


what are the types of Member Functions?

1131


What is stoi in c++?

1181


Can constructor be private in c++?

1041


What is the difference between a declaration and a definition?

1117


How do you import payscale data from non SAP to SAP?is it through LSMW or any other way is there?

3649