This is the last week of CSC148, and we will finish all the lectures tomorrow. We talked about merge sort, quick sort and Big-oh, which are related with time consuming. For the hash table, I am kind of confusing with it, since we have no more labs so that we can do similar practices on the course material, and there are no other practices or notes on it besides the course slides, so I will try to figure it out tomorrow. The semester is almost finish and it's time to start reviewing for the final. Although I got a higher marker on test 2, I still believe that the materials are much harder and I would spend more time on the content after test 1. The course is finishing though, I won't stop studying computer science, and I believe that everything I learnt this year would definitely play an significant role in the following studying.
Happy coding and good luck on exams!!
Hello CSC148
2016年4月7日星期四
2016年3月30日星期三
WEEK 11 SLOG
Week 11 slog
Mingjie Zhu
1002110404
This week, I want to talk a little bit more about my week 5 slog. In week 5, we just finished the studying of stack, queue and linked lists, so in my slog I talked about them and said that they are easier to handle (comparing with other materials such as recursions). At that time, I was just thinking about the way stack or queue works, which is basically “first in first out” or “first in last out”, since it is easy to understand and most of the time it can be thought as a special kind of list. Now, after several weeks of studying, I think I develop my understanding of it in some way.
Firstly, I think I learn more about when and how to use them, besides working with a question on the test or in the lab saying that “writing a function using stack” or “write a special method of stack”. For instance, in assignment 2, there are two ways to write the most important and crucial functions. One of them is by recursion, and the other one is using a stack or queue. By using a stack or queue, I think the whole process becomes more clear and logic to trace and work. This is a very helpful example on applying stack or queue in other functions as well as using them to solve problems. It also reminds me that they can be applied into many other places and therefore bring a more convenient path to the solution.
What’s more, I learnt that they are one of the “advanced” versions of list, and therefore there will be more relative functions coming out. They might look like another list, set, or dictionary, but we can create them with different methods and as a result make it better and easier to use in our own program. It also reminds me that, although stack looks like a list, I cannot use it as a one hundred percent list. For example, I wrote “for item in stack” on my test1, which was completely wrong since I could not assume that a stack is iterable.
Also, it’s interesting to note that, in my week 5 slog I wrote that I didn’t have enough time for test 1, and I would need to speed up while understanding the question and developing an answer. Fortunately, I am becoming more and more familiar with the material such as building classes or writing functions, and in test 2 I got a really high mark. Going to keep working harder and hoping to do well with the final.
2016年3月26日星期六
week 10 Slog
This week we started talking about the
processing time on running a function, by using the BigO and different types of
sorting algorithms, such as quick sort. I learnt about bubble sort, insertion
and selection sort in 108, but I almost forgot them, and we also learnt some
new methods. The lab this week was basically about comparing the running time
as well as figuring out formulas of the time spending. I am not quite familiar
with those materials, probably because this week we spent most of the time on
the assignment. This assignment was much harder than the first one I thought,
since the most crucial part uses recursion (or while loops) and building trees
all together. We also got the test back, and I got a really high mark, which surprised
me a lot. However, I am pretty sure that I still have issues with recursions as
well as building trees, so I still have to work on it before the final.
2016年3月17日星期四
week 9 slog
This week on Monday, we talked about binary
tree functions and binary search tree, and we had the term test 2 on Wednesday.
I think the test is quite fair since it almost covers everything basic and important
from what we have learnt, for example, recursion on list comprehensions, binary
trees recursion and linked lists. I still have a little trouble with binary
tree recursions but the rest of the test was okay. The timing is fair and appropriate,
although I just found out one of my mistakes when it was time to stop (which is
bad for me). To conclude, I think I finished it better than the last time and
hope to get a higher mark on this.
2016年3月10日星期四
week 8 slog
This week we talked about binary trees and the recursive methods that applied into it. The lab was also about trees and recursions, and fortunately after one week of practice I think I am getting on the right track since I figured out the solutions to the lab much faster than the last time, and I am getting to really understand how to write a recursive function structurally. I also start the assignment 2 and found out that it uses lots of recursion, and therefore it would be quite a challenge for me. The second term test is on next week and I will have to start the reviewing as early as possible. This time I will also spend more time on reading notes and lecture slides, but I will do more practices on recursions in order to be more familiar with that as well as saving me time during the exam.
2016年3月2日星期三
Week 7 slog
In this week, we talked a lot about
recursions and trees. After one week’s of studying, I learnt that recursive
function is a kind of function that calls itself in its body. Recursion is
really efficient and useful, since it can solve problems easier and faster without
writing lots of unnecessary repeated codes, and therefore save the running time
and make the whole program more efficient. By using recursive function, we
break up the whole problem into smaller parts (usually the base case and the
general case which seems to have the same structure and therefore we can apply
the recursive process), and combining the solutions from each into a final
solution. However, I find out that it’s easy to make the function repeat
infinite times by writing the wrong recursive function, and sometimes I still
found it confusing when tracing some parts of the function. I can figure out
the base case very easily, but usually miss some crucial parts for the general
case. We also start talking about trees, which applies recursions a lot. Since “trees”
looks closer to real life, it is easier to understand the recursive process as
I try to trace the function. I know I am not really good at recursion, and
therefore I will need to practice more on my own on it.
2016年2月24日星期三
week 6 slog
After the reading week, we started learning recursion. As far as I know, recursion is basically a clever function which recalls itself. As I see the examples in class, they all look simple to understand, and also straight forward to trace them. However, as I wish to write a recursive function, I find it kind of difficult since it is easy to make mistakes which will cause the function failed (or repeating infinite times). Overall, recursion looks interesting to me, and I am looking forward to having the chance practicing it in class and in labs.
订阅:
博文 (Atom)