Generate all permutations of a given input.
Asked in the onsite, final interviewer stage. Candidate could not solve it, and the interviewer switched to Two Sum. Reported follow-up: Two Sum.
Implement generate_permutations(items). The input is a list of distinct elements. Return a list containing every possible permutation, represented as a list. The order of the returned permutations does not matter.
def generate_permutations(items):