Thursday, 26 March 2015

Binary Search Trees

My god, i swear i LOVE this topic. It's really simple and convenient to understand: It has just two children and everything on the left has a smaller value than the parent node and everything on the right has a bigger value. While revising for the first term test, i saw questions about Binary Search Trees on previous papers and i initially found them weird. My first thought: "Why do we have tree-like structures in a Computer Science syllabus?" After studying it, i realised how cool and elegant it is. It's pre-order, in-order and post-order traversal is pretty simple to understand too!

This week was a really nice week for me in the sense that i got to learn something really interesting.



Picture from: http://yannesposito.com/Scratch/img/blog/Haskell-the-Hard-Way/yo_dawg_tree.jpg

No comments:

Post a Comment