This last week has been the most interesting so far... mostly because of what A2 pushed me to do.
I had to figure out how to speed up running time by removing unnecessary loops, using fast data structures like ordered dictionaries and deque, and I also had to learn how to implement search algorithims within the context of a puzzle solving problem.
By using queues I managed to do both searches iteratively. I got to admit the exercises from class, as well as the discussion on Piazza really helped me design a search algorithm that on first glance is incomprehensible, or atleast leagues more difficult than simply using recursion (for DFS).
However, when it all came together, the concept of iterative DFS is just insanely simple. It's simply the queue system of BFS with a one statement difference - children are prepended instead of appended.
As for the lecture material for this week refreshed some concepts of the deletion BST method and we touched on the differences between different Big O running times from constant to exponential. What was emphasized to us (with some humor) was how drastically poorer you could make your program run if you were to use one too many loops.
Overall, I enjoyed the fact I liked how CSC 148's material and lessons really came together in this final assignment and week's material, and I really feel like I improved my programming/logic skills.
No comments:
Post a Comment