Update permutations.py#8102
Merged
chriso345 merged 11 commits intoTheAlgorithms:masterfrom May 31, 2023
Merged
Conversation
Earlier in the permutation function it is creating an infinite recursion which is causing an error instead of that I used backtracking to get the output
for more information, see https://pre-commit.ci
CaedenPH
requested changes
Jan 26, 2023
Contributor
CaedenPH
left a comment
There was a problem hiding this comment.
Instead of deleting the old code, perhaps create an alternate function using the backtracking method, while keeping the original function.
modified permute function which is using recursive methode to permute2 function which is using backtracking to find the output
for more information, see https://pre-commit.ci
Contributor
Author
|
I have created a new function named as permute2 with the backtracking method |
for more information, see https://pre-commit.ci
rohan472000
suggested changes
Apr 24, 2023
| @@ -1,7 +1,9 @@ | |||
| from typing import List | |||
|
|
|||
Contributor
There was a problem hiding this comment.
remove from typing import List as it is unused , creating pre-commit error.
for more information, see https://pre-commit.ci
chriso345
previously requested changes
May 17, 2023
added test case in permute2 fuction
for more information, see https://pre-commit.ci
chriso345
requested changes
May 18, 2023
chriso345
approved these changes
May 31, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Earlier in the permutation function it is creating an infinite recursion which is causing an error
instead of that I used backtracking to get the output
*[x] Fixed a bug or typo in an existing algorithm in permutations.py?