ElonReveMusk / Hactoberfest-2022

Contribute to all your PR's over here to get some awesome Hactoberfest goodies.
Apache License 2.0
7 stars 76 forks source link

Create Return Permutations In cpp.md #21

Closed CodyHarsh closed 2 years ago

CodyHarsh commented 2 years ago

Here Is the question which is asked in top mnc like google, Microsoft and many more. I have added one question and other 2 commits are creating a file and deleting that file. So one commit is useful. Question: Given a string S, find and return all the possible permutations of the input string. Note 1 : The order of permutations is not important. Note 2 : If original string contains duplicate characters, permutations will also be duplicates. Input Format : String S

Output Format : All permutations (in different lines)

Sample Input : abc

Sample Output : abc acb bac bca cab cba