Showing posts with label Algorithms. Show all posts
Showing posts with label Algorithms. Show all posts

Monday, January 10, 2011

Sorting Algorithms In Your Favorite Languages

I found this cool article about which sorting algorithms are used by the major development languages. It's an interesting read. During most development you don't actually need to care, but it's interesting to know. There are a few times where it actually matters though.

For example, if your real-time application requires something to run in O(n*log(n)), you can't rely on your language's built-in quick sort. If sorting is the bottle-neck in your code, and you know something about the input(say that the numbers are bounded by some number, k), then you can optimize that code by implementing a non-comparison model sorting algorithm, like counting sort (O(n+k)). Probably the most useful thing I learned in CS 241 is that if you know something about your input, you can usually do much better than the generic algorithms.

In other news, work is going really well. I am learning a lot about user interfaces and web development. It's a different and fun way to approach development. I'm enjoying the breadth of new technology I get to work with on a day-to-day basis.

Tuesday, December 14, 2010

Note To Self

Note to self: Do not completely neglect a course throughout the term just because it's a first year course and it seems much less challenging (and interesting) than your other courses. This makes exam period 204% less fun. Damn you, Physics! Why did you have to be so much less interesting than my other courses this semester? A lot of times I was like "Go to physics" or "Work on OS for an extra hour". Guess what I choose to do most of the time. :P 

In other news, algorithms went pretty well! The hardest course I've take so far in my university career is over! Woo! They were nice on the exam. They could have killed us (much like they did on the assignments), but instead they gave us tons of marks for doing simple things like tracing algorithms we had to know.

If I survive Physics (Thursday), It should be smooth sailing for the rest of my exams. I am not too worried about the OS and DB finals. After that, I will have time to do some more preparation for my work term. Specifically, learning as much as possible about GWT, and learning the ins-and-outs of git using this book (Jesse should be happy :P).

Saturday, December 11, 2010

The Sound Of Sorting

This is a little old, but it's cool nonetheless. The sounds of various sorting algorithms.



I am in exam study mode. Bleh. Starting Tuesday, I have an exam every two days until the end (22nd). Unfortunately, my two hardest exams are first. I have to learn first year physics by Thursday. Woo! At least it should be smooth sailing after that.