Lists

ArrayList vs LinkedList: two lists with the same methods and opposite costs, how an ArrayList grows, and removing while iterating.

  • 8 cards
  • 6 questions
  • About 9 min
  • Intermediate to Advanced
Share

Java's two general-purpose lists, ArrayList and LinkedList. They implement the same interface with the same methods and behave in opposite ways, which makes them the clearest case in the library for choosing on cost rather than on API. It covers how each stores elements, reading by position, inserting at the front, how an ArrayList grows, choosing between them, and removing elements during a loop. It leaves out concurrent lists.

Contents

8 cardsnot started