TL;DR. I've got some beautiful trees.

Oh, yeah! I was playing with binary tree traversals and I implemented a function to measure the number of levels in a tree. I was too lazy to create a binary tree just to test a simple function, so I decided to create my own random binary tree generator, to which I could pass the number of levels and then, test the other function.

It worked in the third attempt, and the number returned by the function was actually matching with the number of levels that I passed as argument to the first function. But I wanted to see how the generated binary tree actually looked like, and found an excellent tool called GraphVis, which then allowed me to graph the tree into a PDF. I created a graphing function and it worked after some fixes.

Here's the result of my program, simply beautiful:

Your Job Suck?
Get a Better Job
Add Comment