UVa 110 - Meta-Loopless Sorts

ACM UVA 110 - Meta Loopless Sort
Meta Programming

Meta programming is a far effective programming technique to optimise the resolution of problems involving constants.

A example of meta programming is the sorting of long fixed size arrays which takes far less time and far more memory to be executed than a standard sorting algorithm. Such optimisations are useful while considering the size of the array invariant and several requests for sorting operations.

Futhermore, the time taken to sort such arrays can be reduced from $$O(n.log(n))$$ to $$O(log(n))$$ considering a memory addressing space of $$O(n.n!)$$. If several sortings are considered and n is small enough for a memory of $$O(n.n!)$$ to be arranged and great enough for $$O(n.log(n))$$ to be really bigger than $$O(log(n))$$, then a meta programming aproach might be compelling.