felipernb/algorithms.js — pull request #62 by eush77 (2014-06-23 20:39:17+00:00)
Title: Add algorithm to generate the next permutation (lexicographically)

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