Add algorithm to generate the next permutation (lexicographically)

Narayana's algorithm: https://en.wikipedia.org/wiki/Next_permutation#Generation_in_lexicographic_order