Updated permutateLexicographically.