Overview

We have been using several of Java’s built-in data structures so far and its important to have an idea of their time efficiency as we consider the efficiency of our programs. Today’s prep is focused on how we can get a sense of what is going on under the hood with ArrayList and HashMap.

Basic Learning Objectives

Before class, you should be able to:

  • Identify the Big-O efficiency of ArrayList and HashMap operations
  • Explain at a high level what garbage collection is
  • Initialize a new array
  • Explain at a high level how an array differs from a linked list

Advanced Learning Objectives

After class, you should be able to:

  • Reason about when the Java built-ins should be fastest
  • Explain the worst-case efficiency of adding to an array
  • Implement your own array
  • Explain the pros and cons of array-based and linked-based structures

Readings

You should read the reading assignment through Moodle:

  • 8.2
  • 2.5- 2.7

Checks

You should complete the reading checks embedded in the reading assignment on Moodle.