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

What is using namespace std in cpp?

1167


What is the use of setprecision in c++?

1018


Does c++ have finally?

1041


What is split a string in c++?

1193


Is c++ an integer?

1040


Difference between struct and class in terms of access modifier.

1195


Comment on c++ standard exceptions?

1075


Describe public access specifiers?

1111


How a macro differs from a template?

1180


How would you use the functions memcpy(), memset(), memmove()?

1098


What are the main features of c++?

1017


Where can I run c++ program?

1070


How to declare an array of pointers to integer?

1145


When you overload member functions, in what ways must they differ?

1049


Do class declarations end with a semicolon?

1088