linkedlist related questions


LinkedList l=new LinkedList (Colletion c);

above linked list constructor takes any kind of collection object including map, queue, stack as argument?

How array based queue and stack is different from   linked list  based queue and stack? Any sample example on each kind

what are advantages disadvantages of linked list with respect to insertion, deletion, retrieval.

what are advantages disadvantages arraylist, linkedlist and when to use each one.

How is retrieval from Collection object different from deletion. please advise
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

You can only get so far by asking widely generic questions on websites like this in my opinion. There is nothing to stop you reading the Java vendor's webpages on all the API subjects you want to learn, or indeed the dozens of expert books that are online and in bookshops. But by asking us to reproduce what is already in all these sources in a more readily-digestible and unambiguous way than they already are, is a task that isn't going to help you and that few people will want to spend their time on.

Make your questions more precise, as and when you have a problem with your code, and you are likely to get a better response.
gudii9Author Commented:
I know there are lot of books there on each topic. The reason i am asking experts here is to get deeper insight and practical advise.
gudii9Author Commented:
But i will definitely follow your advise to read more on the books as much as time permit me to read
How array based queue and stack is different from   linked list  based queue and stack? Any sample example on each kind

ArrayList uses an array internally to store the "list" of values.
LinkedList uses a series of elements, each pointing to the next (and previous) in the list.

The main difference is that to get an element from a linked list you need to go through all of the elements in the list (following the links).  For the array you can go directly to the element you need.  So the array list is MUCH faster when looking up values.  In return, linked list is SLIGHTLY faster when adding elements.

So 99% of the time you should be using ArrayList.  Only in very special cases (where you do lots of inserts and few lookups) would LinkedList make sense.

Hope that helps,


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.