ArrayList
Generics
Asymptotics
Searching and Sorting
Exceptions
100

Class in Java which acts as a List

What is an ArrayList?

100

The ability to write a generic class/method and have it be able to handle different types of objects

What is the purpose of generics ?

100

The rate at which the number of operations increases as the input size grows

What is Big O?

100

Organizing data to make data retrieval much faster

What is the purpose of sorting?

100

An Object that represents an issue or a condition that prevents execution from proceeding normally

What is an Exception? 

200

Line of code to import ArrayList

What is import java.util.ArrayList;?

200

The key benefit of generics is to allow errors to be caught at _______

What is compile time?

200

Big O of f(x) if f(x) = 2x+5


What is Big O(n)?

200

Big O of Insertion Sort

What is O(n^2)?

200

2 types of Exceptions

What are Checked and Unchecked Exceptions?

300

Code to create an ArrayList called nums that holds Integers and has an initial capacity of 10

What is ArrayList<Integer> nums = new ArrayList<>(10);?

300

The character(s) that surround a generic parameter in Java

What is angle brackets / < >?

300

Big O of binary search

What is O(log n)?

300

Sort that works by repeatedly swapping adjacent, out-of-order elements through the array, moving the smallest element to its proper location  

What is Bubble Sort?

300

Unchecked Exceptions extend this

What is a RuntimeException?

400

Method to check the number of elements in an ArrayList

What is size( )?

400

The Java convention for a generic parameter that represents members of a List

What is E?

400

Name 2 runtimes that are more efficient than O(n)

What is O(1) and O(log n)?

400

The only type of list you can run binary search on

What is a sorted list?

400

FileNotFoundException is this kind of Exception

What is a Checked Exception?

500

Code to change the second element in an ArrayList called arr to "I <3 1331"

What is arr.set(1, "I <3 1331");?

500

Code to instantiate a new String named str with the value "hi" and a static type of Comparable

What is Comparable<String> str = new String("hi");?
500

Big O for foo

public int foo(int n) {

  int result = 0;

  for (int i = 0; i < n; i++) {

    for (int j = 0; j < 10000; j++) {

      result += i + j;

    }

  }

  return result;

}

  

What is O(n)?

500

Where the target element would be for the worst case of binary search

What is the first or last index?

500

Letting the program crash is not an option for this kind of Exception

What is a Checked Exception?

M
e
n
u