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

15.3 Python GeneratePermutation bug in tests when submitting wrong solution #248

Open
pp5x opened this issue Mar 28, 2024 · 0 comments
Open

Comments

@pp5x
Copy link

pp5x commented Mar 28, 2024

What?

On exercise of 15.3 GeneratePermutation page 230 the solution code and EPIJudge are reversing the swap in the for loop.

I managed to pass the tests without that second swap by generating this list instead:

[[0, 1, 2], [0, 2, 1], [2, 0, 1], [2, 1, 0], [0, 1, 2], [0, 2, 1]]

There must be an issue in the functions checking the list content as there are duplicated results.

How?

Delete the second swap and see all the tests passing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant