CS 165 Midterm: CS 165 CSU M2PracticeExam
Document Summary
The following is a collection of practice problems for the cs165: data structures and. The questions are similar to what they would be on the exam, and contain a combination of free response and written code questions. It is recommended that you attempt to do the questions on your own, without using any outside resources. Some of the practice problems are designed to be trickier than those on the exam in order to cover some of the common mistakes students make. At the end of the document is an answer key, with explanations for some of the trickier answers. Answers for some problems are only as suggested, as there are many correct answers. For problems 1-4, show what the program shown below would print. Hint: draw a picture of the queue and update the picture as it changes. As a reminder, queue. offer(e) and queue. add() inserts to a queue, queue. remove() and queue. pol() removes from a queue, and.