Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update permutations.py #8102

Merged
merged 11 commits into from
May 31, 2023
Merged

Update permutations.py #8102

merged 11 commits into from
May 31, 2023

Conversation

sundaram2021
Copy link
Contributor

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?

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
@algorithms-keeper algorithms-keeper bot added enhancement This PR modified some existing files awaiting reviews This PR is ready to be reviewed labels Jan 26, 2023
Copy link
Contributor

@CaedenPH CaedenPH left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of deleting the old code, perhaps create an alternate function using the backtracking method, while keeping the original function.

sundaram2021 and others added 2 commits January 26, 2023 13:41
modified permute function which is using recursive methode

to permute2 function which is using backtracking to find the output
@sundaram2021
Copy link
Contributor Author

I have created a new function named as permute2 with the backtracking method

@sundaram2021 sundaram2021 requested a review from CaedenPH January 26, 2023 08:20
sundaram2021 and others added 2 commits January 26, 2023 13:57
added list module to Permute2 function
@@ -1,7 +1,9 @@
from typing import List

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove from typing import List as it is unused , creating pre-commit error.

sundaram2021 and others added 2 commits May 17, 2023 20:19
added test case in permute2 fuction
@algorithms-keeper algorithms-keeper bot added the tests are failing Do not merge until tests pass label May 17, 2023
@ChrisO345 ChrisO345 dismissed their stale review May 18, 2023 23:38

Completed

Copy link
Collaborator

@ChrisO345 ChrisO345 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All the tests need to inline, otherwise they fail.

@algorithms-keeper algorithms-keeper bot removed the tests are failing Do not merge until tests pass label May 31, 2023
@ChrisO345 ChrisO345 merged commit 4a27b54 into TheAlgorithms:master May 31, 2023
@algorithms-keeper algorithms-keeper bot removed the awaiting reviews This PR is ready to be reviewed label May 31, 2023
sedatguzelsemme pushed a commit to sedatguzelsemme/Python that referenced this pull request Sep 15, 2024
@isidroas isidroas mentioned this pull request Jan 25, 2025
14 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement This PR modified some existing files
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants