• + 1 comment

    this is a hell of a lot simpler then the nayuki page

    http://stackoverflow.com/questions/1622532/algorithm-to-find-next-greater-permutation-of-a-given-string