Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8070805
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T13:30:49+00:00 2026-06-05T13:30:49+00:00

Can any one tell me clearly why ? Reading is simple in ArrayList,( we

  • 0

Can any one tell me clearly why ?

Reading is simple in ArrayList,( we can access through its array index ), why not in linkedList

Inserting element in arrayList is tough i heard why ? easy in linkedList why ?

Deleting element in arraylist is tough why ? easy in linkedList why ?

I know some thing about arrays, but what going in linkedXXX

Thank you.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T13:30:50+00:00Added an answer on June 5, 2026 at 1:30 pm

    In an ArrayList, you keep an array of references in memory, that is to say, you have a memory position. When you ask for the first element of an ArrayList, you just access the memory position. When you access the 10th element, you access the memory position + 10 times the size of a reference.

    In an LinkedList, you have one element, which has a reference to the next. The next one references the next, and so on. As you can see, there is no direct way of accessing the 10th element in a LinkedList without going one by one getting the next element.

    So, your questions:

    Inserting element in arrayList is touch i heard why ? easy in linkedList why ?

    There are two problems with inserting an element into an ArrayList:

    1. When you put an element in position 3, you need to first move every element starting at position 3 and shift them right once (3 becomes 4, 4 becomes 5, etc…) so that 3 becomes empty and you can put in your new element

    2. If the array that backs your ArrayList is already full, you need to create a new one! This is very costly, since you need to allocate the memory again, and then copy all elements to the new array, and destroy the old one.

    In a Linkedlist, on the other hand, you go to element 1, which points to 2, and then go to 2. In 2, there’s a reference to the old element 3, which you temporarily store elsewhere. You replace it with a reference to your new element, and in your new element, you make next point to the old 3. This is therefore way less costly.

    Deleting element in arraylist is touch why ? easy in linkedList why ?

    Similar reasons as inserting. In an ArrayList, you have to shift all the elements down again, in the LinkedList, once you are at element 2, you make its next point to 4, and voila, 3 is erased.

    And for completeness
    ArrayLists are great if you are going to access elements in a random order, but have the problems of adding and substracting. LinkedLists are great to add and remove, but getting an element that’s not the first or last takes extra cost. So there’s always a trade-off!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Can any one tell me if its possible to create a stored procedure in
Can any one tell me, is it possible to change the default size of
Can any one tell,what is the reason the DefaultBufferMaxRows is automaticaly changing to 10000
Can any one tell me how to format MSISDN number in xcode IPhone application.
Can any one tell me, what is package level logging in log4j ? And
Can any one tell me if I can use a ASP Control instead of
Can any one tell me how can i replace the slideup function with fadeout('slow')
Can any one tell me how to solve the following scenario in Asp.net application.
Can any one tell how to disable focus to a browser. Hi i am
Can any one tell me what is the problem with the following code? I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.