Binary search tree epiphany...

| Posted in , ,

Oh, wow! I finally found a real-world representation of one of the worlds stupidest "computer science" scenarios. I've heard of the binary search tree being of the utmost theoretical importance to CIS instructors. Being a developer, and writing code every day, I can honestly say that I have never ran into an instance where I thought "Oh, this is a perfect time to implement a binary search tree!"

Well, at least now I know that the need does exist, it may have some uses, and wouldn't be a complete waste of retention. It all came down to Morse Code in the end. While writing a regular expression replacement snippet for SOS, I stumbled across this wonderful display of binary-tree-search-ism. ;)

learn morse code
Place your pencil where it says START and listen to morse code. Move down and to the right every time you hear a DIT (a dot). Move down and to the left every time you hear a DAH (a dash). Here's an example: You hear DAH DIT DIT which is a dash then dot then dot. You start at START and hear a DAH then move down and left to the T and then you hear a DIT so you move down and RIGHT to the N and then you hear another DIT so you move DOWN and RIGHT again and land on the D You then write down the letter D on your code copy paper and jump back to START waiting for your next letter.

Comments (2)

    Good post.