Skip to content

Adding test case to catch faulty solution for permutation-challenge#291

Open
ShantanuKamath wants to merge 1 commit intodonnemartin:masterfrom
ShantanuKamath:master
Open

Adding test case to catch faulty solution for permutation-challenge#291
ShantanuKamath wants to merge 1 commit intodonnemartin:masterfrom
ShantanuKamath:master

Conversation

@ShantanuKamath
Copy link

There is a solution floating about where the algorithm suggests to:

  • Iterate through through both string, storing the frequency of the character occurrences in a hashmap.
  • Iterate through hashmap to check if all counts are divisible by 2.

Currently, for this solution, the test cases pass. It ideally should not.
The test case add in the PR will, detect such a solution, and fail it.

@ShantanuKamath
Copy link
Author

@donnemartin Let me know if this looks good to you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Comments