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

Pick the Base

Difficulty: ★ ★ ★ ☆

I watched the film Contact a few weeks ago. The movie is about first contact with an alien civilization. It’s smart cinema, which offers that communications between species would be mathematical in nature, as math is the universal language.
Continue reading