CS302 Midterm Exam -- October 11, 2016
Files
Comments
I understand that this was a hard exam. As you can see, my grading was lenient.
Still, I am going to say that I was disappointed with how y'all did.
My intent was the following:
- Question 1: Heaps and Disjoint Sets, straight from the lecture notes.
- Question 2: Big-O. Although you have to read some code, you should have
been prepared for what I was going to ask: Big-O of priority queues, Big-O of
disjoint sets, Enumeration Big-O, Vector/Map/List Big-O. I ask these questions
on every CS302 midterm.
- Question 3: This was a div/mod enumeration, as described in the first paragraph
of the enumeration lecture notes. No surprises and nothing fancy. I was expecting
very good scores on this question, and I was surprised at how many of you didn't
answer s.size()n, and how many of you didn't write div/mod code,
even when you did answer
s.size()n.
- Question 4: I knew this would be hard for you, but I was hoping that you had
studied your bit arithmetic, which would make it easier.
- Question 5: I'm going to express my disappointment on this question.
I meant this to be an easy question -- I use sscanf() and
printf() in class
and in lecture notes. I've given you topcoder questions that give you practice with
sscanf(), and your first lab gave you practice with sscanf() and printf().
If you haven't been using sscanf(), then you should be using stringstreams, and
you've been doing that since CS140.
Even if you didn't remember that "%x" is
how you read hex, you could have made something up, like "%h" and put a note in
your code that you forgot. When students did that, I gave them full credit.
Even if you didn't remember that you could use sscanf to test for the "0x",
you could use the find() method of a string, or even substr(), or just an if
statement checking the two characters.
Also, I gave you two points for reading the command line properly:
for (i = 1; i < argc; i++)
You read the command line in labs 1, 3 and 4. I do it in every set of lecture
notes. Yet 1/3 of you didn't do it correctly.
On a 20 point question, those things accounted for 15 of the 20 points, plus
you got a point for calling do_transpose().
Only 9 of the 61 students got 14 points or more. Now, I understand that
you were under time pressure; however, I assume that you read over the exam when
you first get it. I assume that you knew this question was much easier than
question 4, and even question 3. Then, why not answer this one first, so you can
get the points for answering a question that you know how to answer?
Here is the mapping of scores to grades:
- A+: 78 - 85
- A: 60 - 78
- B: 50 - 60
- C: 40 - 50
- D: 33 - 40
- F: 0 - 33
Tukey Plots
This is a Tukey Plot, which has lines to the max and min, yellow box denoting
the 1st and 3rd quartiles, hash marks at the median, and dot at the mean.
In the answers and grading, there are histograms of scores for each question.