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

1) copy content of element 5 to element 4
2) link element 4(which already contains number 5) to
element 6
3) delete element 5

Is This Answer Correct ?    10 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain what data encapsulation is in c++?

1158


Which format specifier is used for printing a pointer value?

1108


What is the need of a destructor?

1203


Can you explicitly call a destructor on a local variable?

1071


what is a reference variable in C++?

1289


What is std namespace in c++?

1232


explain the reference variable in c++?

1135


What are the advantages of c++? Explain

1117


Explain shallow copy?

1114


What is virtual table?

1175


What is the most powerful coding language?

1107


What is a type library?

1154


What c++ library is string in?

1107


What is using namespace std in c++?

1208


What are the syntactic rules to be avoid ambiguity in multiple inheritance?

1233