Generate all permutations of an array · 2daysbeforeinterview