C
Solving Sudoku puzzles
I have recently taken up the challenge of solving Sudoku puzzles. Not that I intend to spend any of my precious free time sweating over a 9 by 9 grid, pencilling in (and subsequently erasing) numbers to complete the pattern. Oh no, not I. I find it much more challenging to write a program that will solve Sudoku puzzles for me.
Finding the number of digits in N!
A quick bit of code to find the number of digits in N!
| The number of digits in a number X = | CEILING[log(X)] |
| and N! = | (N * N-1 * N-2 ... * 1) |
| Thus, the number of digits in N! = | CEILING[log(N!)] |
Word counting using a binary tree dictionary
Introduction
In "The C Programming Language", the authors present an example program that counts unique words in a text. Such a program needs to maintain a list of every unique word encountered, and for each word, an associated count of the number of occurrences.
Computing e
Introduction
One of the things computers are useful for is computing large (and small) numbers. The number called e is the base of natural logarithms, and is one of those "transcendental numbers".




