Hacktoberfest icon indicating copy to clipboard operation
Hacktoberfest copied to clipboard

Added New File Permutations_Approaches.cpp

Open PradeepKumarDwivedi opened this issue 4 years ago • 0 comments

Hi,

I have Added two approaches for finding the permutations of the digits given.

Approach first is based on the concept where we need to find the next greater number using same set of digits. In order to get all possible distinct permutations we sort the numbers which gives us the lowest number possible with same set of digits and then we keep on finding the next greater number until no greater number is possible with same set of digits.

Approach second is more generic in finding permutations or the combinations of the numbers, this is based on breadth first search(BFS). Here We need to handle the duplicates.

Please approve the pull request. I am contributing first time so it will be a great motivation!

Thanks and Regards, Pradeep Kumar Dwivedi

PradeepKumarDwivedi avatar Oct 24 '20 12:10 PradeepKumarDwivedi