Friday, 21 March 2014

Week #10

The first class of this week was mostly spent talking about Assignment 2 Part 2. At the time I had already finished is_regex and build_regex_tree and was mostly done regex_match. The one that was mainly giving me problems was all_regex_permutations. At first I didn't understand what exactly was being asked but once the professor explained it in class I understood exactly what was needed. It really helped that we could use the code for making permutations from week 4. After that it was just a matter of checking which of the permutations are regular expressions and which are not. This was very easy since I had already implemented is_regex.

It was also helpful when the professor explained how to check regex_match for StarTrees. I had a code that didn't use recursion but it was very messy and complicated but by using recursion I was able to shorten the code a lot.

The rest of the class was spent talking about the efficiency of different sorting algorithms. I found it especially interesting to see how much quick sort depends of whether the list is close to sorted or not.

The tutorial this week was actually very interesting where we tried to combine binary trees with linked lists. Me and my partner were able to finish the lab with time to spare but we did hit a snag. we were able to fix it in the end but it was interesting to see.

No comments:

Post a Comment