nrev Test Program

The naïve reverse computes the reverse of a list by invoking a concatenate function. The order of the algorithm thus becomes O(n2). An algorithm with an accumulator parameter would be more efficient. Nevertheless the predicate is a popular benchmark and it was already found in D.H.D. Warren’s thesis [2, page 219].

One test iteration will reverse a list with 30 numbers.

Kommentare