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

fix(pairwise): Clarification of instructions, closes #9037 #12372

Closed
wants to merge 1 commit into from
Closed

fix(pairwise): Clarification of instructions, closes #9037 #12372

wants to merge 1 commit into from

Conversation

gristow
Copy link
Contributor

@gristow gristow commented Jan 5, 2017

Pre-Submission Checklist

  • Your pull request targets the staging branch of FreeCodeCamp.
  • Branch starts with either fix/, feature/, or translate/ (e.g. fix/signin-issue)
  • You have only one commit (if not, squash them into one commit).
  • All new and existing tests pass the command npm test. Use git commit --amend to amend any fixes.

Type of Change

  • Small bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds new functionality)
  • Breaking change (fix or feature that would change existing functionality)
  • Add new translation (feature adding new translations)

Checklist:

Description

Clarification of instructions to better match the test cases. Replace this paragraph, in the original wording:

If multiple pairs are possible that have the same numeric elements but different indices, return the smallest sum of indices. Once an element has been used, it cannot be reused to pair with another.

Which seemed to suggest that in the test case pairwise([0, 0, 0, 0, 1, 1], 1)===10 only the pair of indices {0, 4} should be used, to fit the criterion 'if multiple pairs are possible ... return the smallest sum of indices.' However, the expected behavior of the test is that indices {0, 4} and {1, 5} should both be used.

To reflect that, the paragraph is replaced with:

You may use multiple pairs that have the same numeric elements but different indices. Each pair should use the lowest possible available indices. Once an element has been used it cannot be reused to pair with another element.

@camperbot
Copy link
Contributor

@gristow thanks for the PR.
Do not include issue numbers and following keywords in pull request's title.
Do not include issue numbers and following keywords in commit messages.
Please, review our Guidelines for Contributing, thank you!.

@BerkeleyTrue BerkeleyTrue added the status: waiting review To be applied to PR's that are ready for QA, especially when additional review is pending. label Jan 5, 2017
@camperbot
Copy link
Contributor

@gristow updated the pull request.

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

3 participants