Full threadmroll·imo the coolest way to generate permutations https://en.m.wikipedia.org/wiki/Factorial_number_systemView on HN