IBM Interview Question

Write a program for permutation