Base 36 Powers

To build a number in base 36, you need to know the powers of base 36. This information is required to output digits — 0 through 9 and then A through Z — in the proper order to represent a base 36 value. This task may seem complicated, but it’s the same process that takes place for any counting base.
Continue reading

Searching a Binary Tree

As you might suspect, searching a binary search tree (BST) involves a recursive function. This function must plow through the tree, finding a value in a specific node. Because the BST is organized, the search process works far more quickly than when the data is unorganized or set in a sequential array. In fact, the bsearch() function uses a similar scheme requiring that the data first be sorted before the function works its magic.
Continue reading