Here is a general outline of the key concepts and commands (arranged by topic) that you should know for Exam 01.
The exam will have the following format:
Developer Tools/Data Allocation: Identify which commands perform certain tasks and analyze the output of debugging and tracing tools (multiple-choice, fill-in-the-blank).
Arrays/Stacks: Analyze, trace, and debug the implementations of a dynamic array and a stack (multiple-choice, fill-in-the-blank).
Lists/Queues: Analyze, trace, and debug the implementations of a linked list and a queue (multiple-choice, fill-in-the-blank).
Search/Sets: Analyze, trace, and debug the implementations of linear search, binary search, and a set (multiple-choice, fill-in-the-blank).
Sorting: Analyze, trace, and debug the implementations of various sorting algorithms (multiple-choice, fill-in-the-blank).
Hash Tables/Maps: Analyze, trace, and debug the implementations of a hash table and a map (multiple-choice, fill-in-the-blank).
This check list is meant to be representative, rather than exhaustive (ie. there may be questions that show up on the exam that are not shown below).
Exam 01 will take place during our normal lecture session on Friday, October 13 from 10:30 AM - 11:20 AM in 136 DeBartolo Hall.
The exam will be in-person and on paper.
Students will be permitted access to one letter-sized cheatsheet (front and back).
The instructor will arrive 10 minutes early and will try to stay 5 minutes after the class period to provide some buffer, but it will be subject to the classes before and after the course.
How would do you use git to:
Retrieve new changes from a remote location.
How do you write a Makefile
that utilizes rules and variables
for a program that consists of multiple files?
How would you use gdb to debug a segfault?
How would you use valgrind to debug a memory error?
How many bytes are common types?
char
int
double
size_t
int64_t
void *
How many bytes in composite types?
structs
Where is memory allocated?
stack
heap
data
code
How would implement the following dynamic array methods?
array_create
array_delete
array_append
array_insert
array_remove
array_resize
What are the time and space complexities of the dynamic array methods?
What does amortized mean?
How would you implement the following stack methods?
stack_push
(using a dynamic array or linked list)stack_pop
(using a dynamic array or linked list)
What are the time and space complexities of the stack methods?
What does it mean for a stack to be LIFO?
What are some applications of a stack?
How would implement the following linked list methods?
list_create
list_delete
list_append
list_insert
list_remove
list_reverse
What are the time and space complexities of the linked list methods?
tail
pointer?Using a doubly linked list?
How would you implement the following queue methods?
queue_push
(using a dynamic array or linked list)queue_pop
(using a dynamic array or linked list)
What are the time and space complexities of the queue methods?
What does it mean for a queue to be FIFO?
What are some applications of a queue?
How would you implement linear search?
Recursively?
How would you implement binary search?
Recursively?
How would you implement the following set methods?
set_add
(using a dynamic array, linked list, or hash table)set_contains
(using a dynamic array, linked list, or hash table)
What are the time and space complexities of the set methods?
What are some applications of a set?
How would you sort a sequence of values?
Using quick sort?
What are the time and space complexities of the sorting algorithms?
Which of these sorting algorithms are adaptive?
Which of these sorting algorithms are stable?
Which of these sorting algorithms use divide-and-conquer?
How would you perform multi-factor or multi-dimensional sorting?
How would implement the following hash table methods?
table_create
table_delete
table_insert
(using linear probing or separate chaining)table_lookup
(using linear probing or separate chaining)table_resize
(using linear probing or separate chaining)
What are the time and space complexities of the hash table methods?
How does the load factor impact hash table performance?
How would you implement the following map methods?
map_insert
(using a dynamic array, linked list, or hash table)map_lookup
(using a dynamic array, linked list, or hash table)
What are the time and space complexities of the map methods?
What are some applications of a map?