Data Structures
Recursion
Trees
Potpourri
Time Complexity
100

The method that gets you the first element in a stack?

What is Peek()?

100

Recursion

What is a method that calls itself?

100

the distance from the root to the lowest node

What is height?

100

This is the interface that an iterator must implement.

What is Iterator<E>?

100

This is the most efficient time complexity possible for any comparison-based algorithm.

What is O(1)

200

The two instance variables of a Node used in a LinkedList.

 What is Data and next.

200

 When working in java, the term for the potential issue found when the base case is never reached.

What is a stack overflow error?

200

the traversal algorithm: left, root, right

what is inorder traversal?

200

The amount of times a method can recursively call itself in intellij before a StackOverflowError is thrown?

April Fools, you don't have to know this... You get 500 points :)

The actual answer is What is 22944?  

I don't know why they know this, I think they are friends with Mr. Huffman :) jk

200

This is the runtime of linear search

What is O(n)?

300

The policy for adding/removing in a Queue.

What is FIFO?

300

Given this method with the input n = 4. This is the output of the following method. 

public static long fibonacci(int n) {
   if (n == 1) {
       return 1;
   }
   if (n == 0) {
       return 0;
   }
   return fibonacci(n - 1) + fibonacci(n - 2);
}

What is 3?

300

the left node, right node, and data

what is stored inside a node?

300

This type of testing tests the unit with knowledge of its internal structure.

What is White Box testing?

300

For a regular binary tree without ordering properties, this is the time complexity for checking if a value exists.

What is O(n log n)?

400

   Stack methods that throw EmptyStackException.

What is pop and peek?

400

 Suppose we have a triangle made of blocks. The topmost row has 1 block, the next row down as 2 blocks, the next 3, and so on. This recursive method computes the total number of blocks in such a triangle with the given number of rows. 

Public static int triangle(int rows) {.

 if (rows == 1) {
   return 1;
}
return triangle(rows - 1) + rows;

400

Balance the tree

what is a way to improve the runtime for a tree?

400

These are 5 of the tests you could perform on an add method for an ArrayList.

What are adding to an empty ArrayList, adding to the first index, adding out of bounds, adding to a negative index, adding to the index at the end, adding in the middle, adding to an ArrayList that does not exist, adding an item that does not exist, etc.?

400

This time complexity represents the efficiency of finding an element in a balanced binary search tree.

What is O(log n)?

500

The two top interfaces in the Java Collections hierarchy?

What is Collections and Iterable?

500

This is the time complexity of the Fibonacci method we did in class. 

Hint: return fibonacci(n - 1) + fibonacci(n - 2);

What is O(n2) (n squared) ?

500

 a tree where each node has 0 or 2 nodes

what is a full tree?

500

This is the necessary backing class to be able to use an enhanced for loop.

What are collections?

500

When an algorithm always processes a fixed-size data structure like a binary tree with exactly 42 nodes, it has this time complexity regardless of the input values.

What is O(1)?