Quirksand

SICP

SICP 1.2.4 Exercises

September 22, 2012 21:51

This section continues to look at orders of growth, this time by comparing a few algorithms. Much faster ways to solve a problem can often exist, although quite often the code involved is more complicated and harder to understand.

Since there are several ways of doing the same thing going on, and often one of them is taken from the book or built-in, we can test our results by comparing them to the other function’s answers. It’s a good way to know (at least to some satisfaction) that our answers are correct, or at least as correct as the previous method was.

Exercises 1.2.4