There
was no class on Monday and Tuesday, so I spent most of the long weekend
studying for the Mid-Term on Wednesday.
First, I made notes based on the lecture slides and the extra-reading
posted on the CSC148 website. I believed during the process of making notes, I
could memorize the material better. It would also be easier to review before
exam because I can just focus on studying the notes instead of going through
all the readings and example posted. I
specifically spent most time on the “Binary Search Tree” section, because I
found the insert and delete method confusing. Each of them had four cases
(if/elif/else clause), though very similar at first glance, they were actually different.
I also went through the terminologies used in recursive tree structure, as well
as linked structure.
After
finishing my notes, I started to look at the labs documents. I tried to re-do
the lab question starting from lab 06. Of course I took less time when re-doing
the lab question, because I already had the ideas on how to implement each
function during lab time. However, after finishing the lab questions, I
compared the two codes: they were very similar, but the first one had some redundant
lines, which made the code less efficient.
Afterwards, I did the same thing to the exercise, starting from exercise
4. I realized I spent significantly less time completing the exercise and the implementation
was more efficient.
On
Monday night, I finished all of the labs and exercise questions, so I didn’t
know what to do next. I started making up question related to the content. For
example, in lab08, we had to present a recursive tree in inorder traversal, in
linked list structure. I also tried to do preorder traversal and postorder
traversal on my own, and it wasn’t too hard. I also tried to create a function
that does selection sort on a linked list structure (assuming the data that the
node holds is float). The selection sort method was a bit harder, because I had
to write a few helper methods such as a function that find the node that holds
the minimum value in a linked list. Nevertheless, when I finished coding, I
felt very accomplished.