Simplotel Interview Question

Data structures, permutation.