Sunday 30 March 2014

Week 11

Sorting and Efficiency

We went over some sorting algorithms. We learned select sort, bubble sort, quick sort, merge sort and count sort. Each sorting algorithms have different efficiency. In all cases (best, average and worst), running time of merge sort is O(nlogn) which is short compared to other sorting algorithms. Sorting algorithm is more efficient when running time is shorter. Looking at selection sort which is least efficient of the 5 sorting algorithms, the running time for all cases is O(n^2). Running time for insertion sort in best case is O(n) and in average and worst case, it's O(n^2) which is again, not as efficient as merge sort.

Friday 21 March 2014

Week 10

Again, first in the class, we went over assignment 2 part 2.

We went over sorting algorithm and its performance in detail using big O. Why each algorithm takes that much time by examining its sorting method (how many steps it requires to sort a list). For example, for merge sort, we can guess its running time by how many steps there are each time we split and sort the list.

Friday 14 March 2014

Week 9

In our lecture, just like weeks that we had exercise to submit, we went over what we had to do for each function. I found it extremely hard to finish the exercise even though I went to lecture and listened to what we had to do. I find things are getting hard and I started to struggle.

We started to learn about big-o which is familiar because I learned about it in csc165 and csc108 last semester. However, runtime analysis is still hard to do.

Friday 7 March 2014

Week 8

We went over linked structure which involves trees and linked lists.

This weeks lecture was very helpful for preparation for our A2 assignment since it's about ternary tree.

Doing assignment was okay, the part 1 wasn't too hard after the information sheet carefully.

It explains what to do clearly.

Monday 3 March 2014

Week 7

Recursion

Recursion in definition is defining something in terms of itself.

It has very simple logic but it's running time is long.

Recursion is usually used in stacks and when the stack is too large, it might raise stack overflow error.

If there is no exit condition, the recursion code will run infinitely so it is very important to assign exit condition.

Friday 14 February 2014

Week 6

We went over trees this week.

Trees are like nested lists.

It was very interesting to discover new way to express mathematical equations.

Animal trees were also interesting.

When I was young, I liked to do these types of solving when I have to answer multiples of questions and at the end, it leads to one answer when you reach very bottom of the tree.

Sunday 9 February 2014

Week 5

This week, in the first lecture, we went over the basic ideas of the tower of hanoi to give basic ideas about the assignment for those who haven't started yet and I am one of them so I thought it was really helpful. I didn't even read the assignment before I went to the class so everything was new. I didn't know what the tower of hanoi is so it was very interesting to me listening to the first lecture.

Having read the assignment and trying to get started on it, it seems really hard and very challenging. I am already stuck on step 2, reading the controllers. Now, I have started to worry if I can finish this assignment before deadline but I know I will and will work very hard to achieve it. It is very exciting and concerning at the same time to have this challenging assignment to do and I hope I will do well on it.