Woodstock Blog

a tech blog for general algorithmic interview questions

[Java OOP] Java ArrayList Implementation

Overview

Resizable-array implementation of the List interface. (it’s actually an array of Object)

It’s not synced.

Underlying design

  1. Random access – no need to traverse thru all nodes.

  2. Circular array - Array size is pre-defined. Use head and tail to keep track of list position.

  3. Insertion and deletion - Implement shiftRight() and shiftLeft() methods.

Actual code will come later…