https://www.u-cursos.cl/ingenieria/2010/1/CC61X/1/blog/o/1189
Adaptive Sorting and Coding: Merge Sort and Permutations