Week 11
This week we had the second term test so we didn't have a lot of time in class. During the class we focused mainly on what happens when the stack runs out of room. The example we used in class was with recursion and how when the function keeps running the same function over and over again, you run out of room. I was a little apprehensive at first because I had no idea how you would be able to fix this. I found it very interesting when the professor used a dictionary to give values that were already calculated. I was a little confused when he showed us the implementation with out using recursion but once I traced through some example it started to make sense.
The test was not overly hard except for the last question with the big-Oh stuff. I had a general idea of what kind of big-Oh it was but I couldn't really explain myself so I left that question blank. The other function were not overly hard for me but I did run out if time. I can be slow when implementing functions, especially when I'm under pressure but in the end I think I did okay.
For this weeks slog, we have to talk about sorting and efficiency. I never knew there were so many ways to sort list. What was most interesting for me was how much more efficient Python's built-in sort was compared to the others. Another thing that surprised me was how different function worked better depending on whether the list was close to sorted or not. I'm pretty sure I have a good grasp on efficiency in general but I can't really determine which function would be more efficient just by looking at it.
No comments:
Post a Comment