Lists
Graphs
Stacks + Queues
Trees
100

While traversing a linked list, how do you know you've reached the end?

Traversal pointer is NULL

100

In an adjacency list representation, how many linked lists are needed for a graph with N vertices and M edges?

N

100

Long lines are the norm on the day after Thanksgiving which has this colorful name referring to profit

Black Friday

100

To find the largest element in a BST, repeatedly move in this direction

Right

200

How will this code behave if searchKey is not in the list?

Node *temp = head;

while(temp->key != searchKey && temp != NULL) {

  temp = temp->next;

}

Segmentation fault

200

Which algorithm is the most efficient to compute the shortest path between two nodes in an unweighted graph?

Breadth-first search

200

The dequeue() operation removes the element at this position in the queue.

Front

200

Which binary tree traversal technique could produce the following sequence: Current, LeftChild, RightChild

Pre-order traversal

300

What is the asymptotic complexity of finding the ith element in a linked list of size N?

O(N)

300

Given a pair of vertices, I want to determine if there is an edge between them. Which graph representation would enable me to do this fastest?

Adjacency matrix

300

Which data structure would you use to reverse a string and how? E.g. given "BOULDER", return "REDLUOB"

Stack

300

While deleting a node with two children in a binary search tree, how do you select a replacement?

Minimum element in the right subtree

400

The first female African-American CEO on the Fortune 500 list of companies is Ursula Burns of this document technology giant

Xerox

400

Which algorithm can be used to compute the shortest path in a weighted graph?

Dijkstra's

400

Which graph traversal algorithm can be implemented using the stack data structure?

Depth-First Search

400

What is the asymptotic complexity of searching for a node in a BST with N nodes?

O(logN)

500

What would be the effect of deleting the head node of a linked list?

Memory leak

500

This two-word term refers to the set of vertices in a graph that are all linked by edges

Connected component

500

In the circular array implementation of the queue ADT, how is the tail modified after an enqueue() operation?

tail = (tail + 1) % capacity

500

This kind of binary search tree ensures that the tree is always balanced

Red-black trees, AVL trees

M
e
n
u