Studies show that project that I was just doing for Algorithms and Data Structures is the most retarded thing I’ve ever seen.
Okay, so we have been talking about binary trees recently, and our project was to implement one of two different kinds of trees. The example he gives us was a red/black tree, which is actually pretty cool. Without getting into too much detail, the red/black tree’s nodes are either red or black, and there are rules that, when followed, balance the tree. For example, there may not be two red nodes in a row in any downward path from the root to a leaf, and each path from the root to any leaf must have the same number of black nodes. And so on. When one of these rules is broken, certain fixes (called rotations because you have to rotate the tree or some subtrees around certain nodes to fix it) must be executed.
As for the two kinds of trees, he assigned 2-3-4 trees to every other person in the class and the rest got AVL trees.
AVL is very similar to the red/black tree, except that instead of using colored nodes, it uses a number to determine if the tree is balanced or not. There’s a lot of reusable code there.
As for 2-3-4 trees, they are nothing like red/black trees or AVL trees and we have gotten zero hints about how one would be implemented.
Guess which one I got?
I spent about three hours in the AI lab today and decided that was it. I will turn in the 236 lines of code I have puked into the keyboard and hope that I get a 5/20 on the project. I have an A in the class so I’m not too worried about it.
Not to mention that my practicing didn’t go well at all. Bleh. I need some video games.