Big-O Notation
Arrays and ArrayLists
Single and Double LinkedLists
Stacks, Queues and Deques
Methods
100

Find the big-O notation for the function: 

f(n) = 8n^2 - 2n

What is O(n^2)?

100

This data structure has a fixed length.

What is an Array?

100

The part of a linked list that contains the data.

What is a node?

100

What is the term for the principle that defines a stack where the last element added is the first to be removed?

What is "Last-In, First-Out (LIFO)"?

100

In an ArrayList, this method appends the certain element to the end of the list.

What is add(E element)?

200

Find the big-O notation for the function: 

f(n) = 5n^3 + 3^nlog(n)

What is O(3^nlog(n))?

200

This data structure uses reallocation to make space for more elements. 

What is an ArrayList?

200

This type of linked list has a starting node but no ending node.

What is a Single LinkedList?

200

 In a stack, what is the term for the method that looks at the element at the top without actually removing it?

What is peek?

200

In a LinkedList, this method retrieves and removes the head of list. 

What is remove()?

300

The big-O notation of n^2 usually comes from this piece of code.

What is a nested for loop?

300

When adding an element at a specific index in an ArrayList, we need to shift the elements over this way.

What is the right?

300

In a Double LinkedList, this type of traversal allows you to navigate both forward and backward.

What is bidirectional traversal?

300

What is the primary operation performed on a queue where an element is removed from the front of the queue?

What is poll?

300

In a Queue, offer inserts the specific element here.

What is the end, rear or tail?

400

Find T(n) and big-O notation for the function:

for(int i = 0; i<n; i++){
    for(int j = 0; j<n; j++){
         for(int k = 0; k<n; k++){
              Simple Statement
              Simple Statement
              Simple Statement

     }
  }
}


What is T(n)=3n^3 and O(n^3)?

400

This happens when we try to add an element to a full Array.

What is an error or exception?

400

This type of operation involves adding an element to the end of a singly linked list.

What is appending?

400

In a Deque, offer adds an element here.

What is rear or tail?

400
In a Deque, this method pushes an element onto the Deque at this location.

What is the head, front or beginning?

500

Find C, 𝑛0, and f(n): 

𝑇(𝑛) = 2𝑛^3 − 2𝑛^2 + 10𝑛 − 15 <= 2𝑛^3 + 2𝑛^3 + 10𝑛^3 + 0𝑛^3 

What is C=14, 𝑛0= 1 and f(n)= 𝑛^3?

500

These methods usually execute in constant time for ArrayLists.

What are the set and get methods?

500

To find the nth node in a linked list, you would need to traverse through how many nodes?

What is n nodes?

500

The poll method removes an element here in a Deque.

What is the head or front?

500

In a Deque this method retrieves and removes the head of the deque.

What is poll()?