Société Générale Interview Question

Write a program to check string permutation