Lowest Common Ancestor (BST)

The Binary Search Tree (BST) is a tree like data structure that allows for the quick lookup of data. They work by storing inserted data in a tree like structure that uses the “divide and conquer” approach to locate data. Each node in the tree has, at most, two children. The left hand side (lhs) node will always contain a value that is less than it’s parent. The right hand side (rhs) node will always contain a value that is greater-than or equal to it’s parent.

Continue reading

Not impressed with web host!

So, my web hosting is provided by AtSpace.com and my DNS hosting is provided by Heart Internet. Why are they seperate? Well, it's simply that I originally purchased my domains with Heart but have changed web hosts a couple of times. Since my DNS is configured just how I like it and since it really shouldn't matter who hosts your DNS (as long as they provide the ability to set A and CNAME records) it shouldn't be a big deal. Or so I thought!

Continue reading

Condition Variables

You work in a bar, pouring pints for the locals. One of your regulars comes in; he's looking pretty grumpy today. "Whiskey" he snaps. You put down a glass and pour. You finish pouring and he necks back the drink. "Again", he snaps. Again, you pour and as soon as you finish he necks it. This repeats two or three more times before the grumpy man slams down the money for his tab and leaves. Congratulations, you have just taken part in a "Producer/Consumer" exchange.

Continue reading