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

anagram: tests should not require specific order for returned list #1826

Closed
roadfoodr opened this issue Jun 18, 2019 · 2 comments
Closed

anagram: tests should not require specific order for returned list #1826

roadfoodr opened this issue Jun 18, 2019 · 2 comments

Comments

@roadfoodr
Copy link
Contributor

roadfoodr commented Jun 18, 2019

The anagram problem description does not specify a requirement that the elements of the returned sublist be in any particular order. However, tests in the suite check against a particular ordered list (instead of checking that all the elements of the list are present).

Motivation: in my solution, I wanted to return a list of unique anagrams (although the problem description does not require this.) I included a call to set() in the process, which changed the order of elements.

If there is interest in relaxing this requirement in the test suite, I will be happy to attempt a pull request.

@cmccandless
Copy link
Contributor

@ydrecords Feel free to submit a PR. For testing purposes, please check your changes to the test suite against both your solution and the example solution as-is to verify that no bugs are introduced.

@cmccandless
Copy link
Contributor

Closed in #1828

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

2 participants