Wednesday, March 30, 2016

SLOG Week #11

This week, I will talk about a topic that I talked about few weeks ago, back in week 6, recursion. Recursion is used in function to call the function itself, to repeat itself. Instead of using iteration such as for-loops and while-loops in a function, by using recursion, even though it may take longer to run, it makes iterative function much simpler, and it is much easier to use on data structure like trees. At the time I learned it, I understood the concept and was able trace recursive function by myself but I did not really understand how to implement it when needed. I thought of it as the most annoying and hardest topic for me to understand completely. My biggest mistake was when I was introduced to recursion, I thought it would be the easiest topic in this course, but I was wrong and it ended up being the hardest for me. Now, my views and confidence on that topic did not really change much. It is still annoying to learn and I am still not confident in my abilities when it comes to using recursion, even after learning trees and binary trees, writing test on that subject. Probably did not spend more time on it than I should have. Since recursion is very important part of the course, especially when it comes to trees, I should master my skills on it so that I can finish the course successfully.

Monday, March 28, 2016

SLOG Week #10

This week, we learned about sorting algorithms and their efficiency. There are many sorting algorithms we looked at in this course and in CSC108 but the one we spent most of the time on is the quick sort. Quick sort just breaks up the list and set a number to be a pivot and sort the numbers in respect to the pivot and recombine the list to complete sorting. the sorting algorithm for quick sort and any other sorting algorithms were not hard to understand. For me, it was easy to follow and more entertaining than recursion and trees. But calculating efficiency was pretty difficult and need more of my attention on that topic

Sunday, March 20, 2016

SLOG Week 9


We had our second test this week. Good news is that I did not run out of time, but I still struggled with a few questions and also realize I made some mistakes too, maybe I was too nervous. Hopefully the grade is not as low as it was last time. We are continuing our learning on mutating BinarySearchTree, such as inserting data in to the tree and deleting data in the tree. Now the codes are getting more complicated and need more thinking than other codes we looked at so far. Especially the deleting function had a lot of conditions that we had to check in the code using if and elif. Since I am pretty confident with BST, even though it is still a little confusing, mainly because of recursion, I still expect myself to understand this soon.

Sunday, March 13, 2016

SLOG Week 8


This week, we are learning about Trees and BinarySearchTrees. Trees are in form of tree with root and branch and leaf. We can also think of it as a family tree. Trees are made up of nodes that branches out by a branching factor(arity) and has height and depth. Trees or BinarySearchTrees use recursion and linked list nodes a lot in their functions and I think this is the reason I feels difficult to understand fully. Even though I understood recursion perfectly, it is still very difficult when trying to implement it on functions in Class Trees.  The course is going fine for now, but it feels like the course is slightly getting harder, and I should spend more time on this course especially because we have a test next week, it will be very important to fully understand Trees and BinarySearchTree since I expect majority of test question will be about this topic.

Saturday, March 5, 2016

SLOG Week #7

This week, I am going to write about Abstract Data Types (ADT). ADT is one of the topics I really enjoyed learning. ADTs are objects with information and behavior, meaning what kind of data it stores and what kind of operations will it use on that data. Examples we have seen are stack and queues and both of them are examples that we see in the real world often. Stacks are ordered so that last thing stored is the first one to get out. We can think of it as stacking dishes in the shelves, last dish getting stacked is one top of the stack, above all dishes, so when we take out a dish it will the one at the top, which is the last dish stacked. Queue is the opposite. First thing in the queue is the first thing to get remove. It works like lining up for food in a restaurant. If you are the first one in the line, you will the first one to get served. Since we focus on the real world situations like stacks and queues, it was really helpful to learn and understand the concept. I personally enjoyed this topic very much because the same reason. I really liked how we use the real world situations as examples and it showed me how it can be used and why it is important. Even on the assignment #1, we had to use ADT for storing rider using Queue, and storing events using PriorityQueue and showed how these ADTs can work in the real world situations. I personally think that ADTs are really important topic to learn as I feel like it will be used a lot for programming things like applications, because since we can change how ADTs behave, using it will make organizing data a lot simpler and easier.