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

Make Symmetric Difference Order Invarient #1426

Closed
wants to merge 1 commit into from
Closed

Make Symmetric Difference Order Invarient #1426

wants to merge 1 commit into from

Conversation

SaintPeter
Copy link
Member

As per the discussion in #1402, an actual Symmetric Difference is order independent. Since it is not possible to test for arbitrary order, we instead will sort the user's answer and compare against a pre-sorted test value. This will ensure that any returned order will be correct.

I have done basic testing against chai.js's deepEqual/iterableEqual functions and this solution appears to work properly.

@QuincyLarson
Copy link
Contributor

One of the tests failed with @terakilobyte's solution. https://www.evernote.com/l/AnuX-4sNoL5Nlo2Ij_qy6jwjRpzth5ypagQB/image.png

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

Successfully merging this pull request may close these issues.

None yet

2 participants