While traversing a linked list, how do you know you've reached the end?
Traversal pointer is NULL
In an adjacency list representation, how many linked lists are needed for a graph with N vertices and M edges?
N
Long lines are the norm on the day after Thanksgiving which has this colorful name referring to profit
Black Friday
To find the largest element in a BST, repeatedly move in this direction
Right
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
Which algorithm is the most efficient to compute the shortest path between two nodes in an unweighted graph?
Breadth-first search
The dequeue() operation removes the element at this position in the queue.
Front
Which binary tree traversal technique could produce the following sequence: Current, LeftChild, RightChild
Pre-order traversal
What is the asymptotic complexity of finding the ith element in a linked list of size N?
O(N)
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
Which data structure would you use to reverse a string and how? E.g. given "BOULDER", return "REDLUOB"
Stack
While deleting a node with two children in a binary search tree, how do you select a replacement?
Minimum element in the right subtree
The first female African-American CEO on the Fortune 500 list of companies is Ursula Burns of this document technology giant
Xerox
Which algorithm can be used to compute the shortest path in a weighted graph?
Dijkstra's
Which graph traversal algorithm can be implemented using the stack data structure?
Depth-First Search
What is the asymptotic complexity of searching for a node in a BST with N nodes?
O(logN)
What would be the effect of deleting the head node of a linked list?
Memory leak
This two-word term refers to the set of vertices in a graph that are all linked by edges
Connected component
In the circular array implementation of the queue ADT, how is the tail modified after an enqueue() operation?
tail = (tail + 1) % capacity
This kind of binary search tree ensures that the tree is always balanced
Red-black trees, AVL trees