Salesforce interview question

Edit Distance Pattern printing print all permutations