Thursday, 7 November 2013

Assignment 2

So I didn't go to any lectures the last two weeks. Probably wasn't the best choice but I'm finding it no problem keeping up with the material being covered. I went to the lab today but unfortunately missed the one last week. Today we had to implement certain methods that worked around binary trees and linked lists which I found to be challenging at first because of how new I am to linked lists.

Our second assignment was due a couple days ago, we had to implement regex and match them to strings. Regex are completely new to me but after reading over the outline a few times then checking piazza for how hints I was able to quickly throw together something that ended up working. There were a couple bugs in my code that I took some time to work out. For example, when a DotNode is in a StarNode my code would return false when matching the regex to a string. The error was the way my code checked to see if a StarNode matched the string, it iterated through every single character and matched it to the StarNodes child. I realized the reason this was giving me errors was because with a DotNode the string is more than just one character long, I had to find a new way to match StarNodes. I was able to solve this issue and then used all the test cases posted on piazza to make sure that everything worked properly.

No comments:

Post a Comment