Adds Permute by sorting algorithm.