learn-ocaml-corpus
learn-ocaml-corpus copied to clipboard
New exercise: building suffix arrays.
This exercise explains the concept of a suffix array and proposes a series of relatively easy questions that lead to a naive algorithm for building a suffix array. Then, it moves on to Manber and Myers' algorithm, which is much more subtle. Several building blocks are given so that the student can have a reasonable chance of success. Still, this is definitely a difficult algorithm. The difficulty lies probably more in the algorithmic aspects than in the actual programming task. I have placed several assertions in advance in the code so that the student has a good chance of detecting their own mistakes.