René's URL Explorer Experiment
Title: R50-T004: Test an invariant of swap (OddEvenSort.js) [Sorts/OddEvenSort.js] by stavansomaiya · Pull Request #102 · S-AI-Projects/TheAlgorithms-JavaScript · GitHub
Open Graph Title: R50-T004: Test an invariant of swap (OddEvenSort.js) [Sorts/OddEvenSort.js] by stavansomaiya · Pull Request #102 · S-AI-Projects/TheAlgorithms-JavaScript
X Title: R50-T004: Test an invariant of swap (OddEvenSort.js) [Sorts/OddEvenSort.js] by stavansomaiya · Pull Request #102 · S-AI-Projects/TheAlgorithms-JavaScript
Description: Description
Task
R50-T004 · task 4 of 10 · Invariant/property checks
Issue
#4 · Test an invariant of swap
Student
Stavan Somaiya · URN e26b07f1064
File → function
Sorts/OddEvenSort.js → swap (line 10 at the pinned commit, line 22 after this PR)
Pinned source
TheAlgorithms/JavaScript @ 5c39e87 · OddEvenSort.js#L10
Branch
stavansomaiya:student/e26b07f1064/R50-T004 → S-AI-Projects:master (one commit on 5c39e87)
Outcome
The invariant holds on the fixture and on 100 seeded cases. The implementation is unchanged.
Summary
Adds invariant/property tests around swap in Sorts/OddEvenSort.js.
Why the invariant holds: swap only exchanges two positions, so the multiset of values is preserved. oddEvenSort moves values only through swap, and stops only when a full odd pass and a full even pass make no swap, i.e. no adjacent pair is out of order. So the output is (1) ordered, (2) a permutation of the input with the same multiplicities, and (3) the input array itself, sorted in place. The source defines an ascending interface only.
Files changed
File
Lines
What changed
Sorts/OddEvenSort.js
+27 / −2
swap exported; JSDoc stating the invariant (no logic change)
Sorts/test/OddEvenSort.test.js
+126 / −1
direct swap tests, 6 fixture tests, 5 property tests over 100 seeded cases
work/R50-T004/ (8 files)
evidence
check.py runner, README.md write-up, evidence.mjs, results.json and logs; coursework only, kept out of any upstream PR
Related Issue
Fixes: #4
This PR covers only R50-T004. Each of the 10 tasks has its own branch, commit and PR; see All 10 tasks under Additional Notes.
Type of Change
Bug Fix
New Feature
UI/UX Improvement
Performance Improvement
Tests
Documentation
Refactoring / Maintenance
CI/CD
Changes Made
Sorts/test/OddEvenSort.test.js: direct swap tests covering the in-place exchange, the undefined return and preserved multiplicities. The fixture covers [3,1,2], [2,2,1], [1,2,3], [3,2,1], [] and [7]. The property run has 100 cases from a fixed seed (mulberry32, 20261123, length 0..12, integers -5..5). Ordering, multiplicities and the in-place return are asserted separately. Literal generated cases are pinned, two readable small cases are kept, and any failure reports the shortest failing input.
Sorts/OddEvenSort.js: swap exported with JSDoc stating the invariant; JSDoc on oddEvenSort listing the three properties. No logic change.
work/R50-T004/: check.py (runs two deliberately broken temporary copies), evidence.mjs and results.
Screenshots / Recordings
There is no UI, so the recording is the terminal output of a fresh run on 23 Nov 2026. The run used a clean checkout of this branch with a new npm ci from the lockfile. The output is copied verbatim; only the temporary checkout path is replaced by a label.
Focused tests: npx vitest run … --reporter=verbose, 17/17 passed
$ npx vitest run Sorts/test/OddEvenSort.test.js --reporter=verbose
RUN v1.2.1
✓ Sorts/test/OddEvenSort.test.js > The OddEvenSort of the array [5, 4, 3, 2, 1] is [1, 2, 3, 4, 5]
✓ Sorts/test/OddEvenSort.test.js > The OddEvenSort of the array [] is []
✓ Sorts/test/OddEvenSort.test.js > The OddEvenSort of the array [10, 14, 12, 20] is [10, 12, 14, 20]
✓ Sorts/test/OddEvenSort.test.js > The OddEvenSort of the array [166, 169, 144] is [144, 166, 169]
✓ Sorts/test/OddEvenSort.test.js > swap invariant > swap exchanges two positions in place and returns undefined
✓ Sorts/test/OddEvenSort.test.js > swap invariant > swap preserves multiplicities
✓ Sorts/test/OddEvenSort.test.js > oddEvenSort fixture (ascending, in place) > oddEvenSort([3,1,2]) is [1,2,3] and returns the same array
✓ Sorts/test/OddEvenSort.test.js > oddEvenSort fixture (ascending, in place) > oddEvenSort([2,2,1]) is [1,2,2] and returns the same array
✓ Sorts/test/OddEvenSort.test.js > oddEvenSort fixture (ascending, in place) > oddEvenSort([1,2,3]) is [1,2,3] and returns the same array
✓ Sorts/test/OddEvenSort.test.js > oddEvenSort fixture (ascending, in place) > oddEvenSort([3,2,1]) is [1,2,3] and returns the same array
✓ Sorts/test/OddEvenSort.test.js > oddEvenSort fixture (ascending, in place) > oddEvenSort([]) is [] and returns the same array
✓ Sorts/test/OddEvenSort.test.js > oddEvenSort fixture (ascending, in place) > oddEvenSort([7]) is [7] and returns the same array
✓ Sorts/test/OddEvenSort.test.js > oddEvenSort properties over 100 seeded cases > the generator is deterministic for a fixed seed
✓ Sorts/test/OddEvenSort.test.js > oddEvenSort properties over 100 seeded cases > readable small generated cases sort as expected
✓ Sorts/test/OddEvenSort.test.js > oddEvenSort properties over 100 seeded cases > output is ordered
✓ Sorts/test/OddEvenSort.test.js > oddEvenSort properties over 100 seeded cases > output preserves input multiplicities
✓ Sorts/test/OddEvenSort.test.js > oddEvenSort properties over 100 seeded cases > output is the input array, mutated in place
Test Files 1 passed (1)
Tests 17 passed (17)
Automated check: python3 work/R50-T004/check.py, exit 0
$ python3 work/R50-T004/check.py
[PASS] oddEvenSort([3,1,2])
input: [3, 1, 2]
expected: {"result": [1, 2, 3], "returnsSameArray": true}
actual: {"result": [1, 2, 3], "returnsSameArray": true}
source: OddEvenSort.js:41 ascending, in place, returns arr (line 58)
[PASS] oddEvenSort([2,2,1])
input: [2, 2, 1]
expected: {"result": [1, 2, 2], "returnsSameArray": true}
actual: {"result": [1, 2, 2], "returnsSameArray": true}
source: OddEvenSort.js:41 ascending, in place, returns arr (line 58)
[PASS] oddEvenSort([1,2,3])
input: [1, 2, 3]
expected: {"result": [1, 2, 3], "returnsSameArray": true}
actual: {"result": [1, 2, 3], "returnsSameArray": true}
source: OddEvenSort.js:41 ascending, in place, returns arr (line 58)
[PASS] oddEvenSort([3,2,1])
input: [3, 2, 1]
expected: {"result": [1, 2, 3], "returnsSameArray": true}
actual: {"result": [1, 2, 3], "returnsSameArray": true}
source: OddEvenSort.js:41 ascending, in place, returns arr (line 58)
[PASS] oddEvenSort([])
input: []
expected: {"result": [], "returnsSameArray": true}
actual: {"result": [], "returnsSameArray": true}
source: OddEvenSort.js:41 ascending, in place, returns arr (line 58)
[PASS] oddEvenSort([7])
input: [7]
expected: {"result": [7], "returnsSameArray": true}
actual: {"result": [7], "returnsSameArray": true}
source: OddEvenSort.js:41 ascending, in place, returns arr (line 58)
[PASS] swap([3, 1, 2], 0, 1)
input: [[3, 1, 2], 0, 1]
expected: {"arr": [1, 3, 2], "returned": "undefined"}
actual: {"arr": [1, 3, 2], "returned": "undefined"}
source: OddEvenSort.js:22-26 swap mutates arr, returns nothing
[PASS] property run: 100 cases, seed 20261123, length 0..12, values -5..5
input: {"seed": 20261123, "cases": 100}
expected: {"ordered": 100, "multiplicitiesPreserved": 100}
actual: {"ordered": 100, "multiplicitiesPreserved": 100}
source: OddEvenSort.js:46,52 numbers compared with >
[KILLED] mutant swap loses a value (arr[j] = arr[i]): ' arr[j] = tmp\n' -> ' arr[j] = arr[i]\n'
failed: The OddEvenSort of the array [5, 4, 3, 2, 1] is [1, 2, 3, 4, 5]
failed: The OddEvenSort of the array [10, 14, 12, 20] is [10, 12, 14, 20]
failed: The OddEvenSort of the array [166, 169, 144] is [144, 166, 169]
failed: swap invariant swap exchanges two positions in place and returns undefined
failed: swap invariant swap preserves multiplicities
failed: oddEvenSort fixture (ascending, in place) oddEvenSort([3,1,2]) is [1,2,3] and returns the same array
failed: oddEvenSort fixture (ascending, in place) oddEvenSort([2,2,1]) is [1,2,2] and returns the same array
failed: oddEvenSort fixture (ascending, in place) oddEvenSort([3,2,1]) is [1,2,3] and returns the same array
failed: oddEvenSort properties over 100 seeded cases readable small generated cases sort as expected
failed: oddEvenSort properties over 100 seeded cases output preserves input multiplicities
[KILLED] mutant even pass no longer clears the sorted flag: ' for (let i = 0; i < arr.length - 1; i += 2) {\n if (arr[i] > arr[i + 1]) {\n swap(arr, i, i + 1)\n sorted = false\n' -> ' for (let i = 0; i < arr.length - 1; i += 2) {\n if (arr[i] > arr[i + 1]) {\n swap(arr, i, i + 1)\n'
failed: oddEvenSort fixture (ascending, in place) oddEvenSort([3,1,2]) is [1,2,3] and returns the same array
failed: oddEvenSort properties over 100 seeded cases output is ordered
focused tests: 17/17 passed (node_modules/.bin/vitest run Sorts/test/OddEvenSort.test.js --reporter=json --outputFile=work/R50-T004/vitest-focused.raw.json)
npm test: 11983/11983 passed (npm test -- --reporter=json --outputFile=work/R50-T004/vitest-full.raw.json)
R50-T004: all checks passed
(exit 0)
Testing
Automated check: python3 work/R50-T004/check.py installs from the lockfile and runs the focused tests. It then prints input / expected / actual for every fixture row, runs each deliberate mutant in a temporary copy, and finally runs the repository test script in non-watch mode. It exits non-zero if any assertion or step fails, and records every command in commands.log.
To reproduce:
git fetch https://github.com/stavansomaiya/TheAlgorithms-JavaScript.git student/e26b07f1064/R50-T004
git checkout FETCH_HEAD
python3 work/R50-T004/check.py
Recorded results (committed in results.json; tool versions in versions.txt):
Check
Command
Result
Install from lockfile
npm ci --ignore-scripts --no-audit --no-fund
✅ exit 0
Focused tests
vitest run Sorts/test/OddEvenSort.test.js
✅ 17/17 passed
Fixture evidence (input / expected / actual / source line)
node work/R50-T004/evidence.mjs
✅ 8/8 rows match
Mutant (temporary copy): swap loses a value (arr[j] = arr[i])
applied by check.py
✅ caught by output preserves input multiplicities
Mutant (temporary copy): even pass no longer clears the sorted flag
applied by check.py
✅ caught by output is ordered
Repository test script, non-watch
npm test (vitest run)
✅ 11983/11983 passed
Code style
npm run check-style (Prettier)
✅ passes
Spelling (CI settings)
codespell
✅ no new findings
Acceptance criteria → evidence:
#
Done when (quoted from #4)
Evidence in this PR
1
The checked behavior is tied to swap in Sorts/OddEvenSort.js; every assertion has an explicit expected value.
✅ swap exchanges two positions in place and returns undefined: swap([3, 1, 2], 0, 1) leaves [1, 3, 2] and returns undefined. The fixture tests compare with literal arrays, and the generator test pins literal generated cases (case 0 is [4, 0, -1, -2, 0, -1, -5, 1, -4, 0, -3]).
2
Use [3, 1, 2], [2, 2, 1], already ordered [1, 2, 3], reversed [3, 2, 1], and the smallest supported collection. Expected ascending outputs are [1, 2, 3] and [1, 2, 2]; honor a descending interface if that is what the source defines.
✅ One test per fixture input: [3,1,2] → [1,2,3], [2,2,1] → [1,2,2], [1,2,3] → [1,2,3], [3,2,1] → [1,2,3], smallest [] → [], plus [7] → [7]. Each also asserts that the same array is returned. The source defines ascending order only.
3
Existing supported behavior and the public interface are preserved unless a failing regression demonstrates and documents a defect.
✅ No logic change (swap exported, JSDoc added). The 4 existing tests pass, and the full suite passes (11983/11983).
4
The generator never relies on undefined input behavior; the invariant is justified in the PR.
✅ The generator produces only finite integers −5..5 with lengths 0..12: the comparable-number domain of the > comparisons at lines 46 and 52. No NaN, mixed types or holes. Seed 20261123 (mulberry32). The invariant is justified in the Description above.
5
The checks fail when the relevant invariant is deliberately broken in a temporary copy.
✅ check.py breaks the invariant in two temporary copies. With arr[j] = arr[i] in swap, output preserves input multiplicities fails ([2, 1] → [1, 1]). With sorted = false dropped from the even pass, output is ordered fails ([3, 1, 2] → [1, 3, 2]).
Evidence files: check.py · README.md (contract, fixture, baseline, findings) · evidence.mjs · results.json · vitest-focused.json
Checklist
I have tested my changes locally.
I have added or updated tests, if needed.
I have updated documentation, if needed.
I have followed the project's coding guidelines.
I have run the relevant tests and checks.
I have addressed previous review feedback, if applicable. (No review feedback yet.)
Additional Notes
The checks fail when the invariant is deliberately broken in a temporary copy. With arr[j] = arr[i] in swap, output preserves input multiplicities fails (smallest case [2, 1] → [1, 1]). Dropping sorted = false in the even pass makes output is ordered fail ([3, 1, 2] → [1, 3, 2]). The generator only produces finite integers, inside the comparable-number domain of the > comparisons, so it never relies on undefined input behaviour.
Scope: the PR changes only Sorts/OddEvenSort.js, its test file and work/R50-T004/. work/R50-T004/ is coursework evidence and would be removed from any later upstream PR.
All 10 tasks (one PR each)
Task
Issue
Branch
Pull request
R50-T001: Lock down the contract of setBit
#1
R50-T001
#99
R50-T002: Define the supported boundaries of checkKeywordValidity
#2
R50-T002
#100
R50-T003: Cross-check getParentPosition
#3
R50-T003
#101
R50-T004: Test an invariant of swap
#4
R50-T004
#102 (this PR)
R50-T005: Make verification repeatable for newGeneration
#5
R50-T005
#103
R50-T006: Simplify one responsibility in countLetters
#6
R50-T006
#104
R50-T007: Publish a runnable example for DisjointSetTreeNode
#7
R50-T007
#105
R50-T008: Cover the failure behavior of TrieNode
#8
R50-T008
#106
R50-T009: Measure the work done by fibonacci
#9
R50-T009
#107
R50-T010: Strengthen the tests of OpenKnightTour
#10
R50-T010
#108
Open Graph Description: Description
Task
R50-T004 · task 4 of 10 · Invariant/property checks
Issue
#4 · Test an invariant of swap
Student
Stavan Somaiya · URN e26b07f1064
File → function
Sorts/OddEvenSort.j...
X Description: Description
Task
R50-T004 · task 4 of 10 · Invariant/property checks
Issue
#4 · Test an invariant of swap
Student
Stavan Somaiya · URN e26b07f1064
File → function
Sorts/OddEvenSort.j...
Opengraph URL: https://github.com/S-AI-Projects/TheAlgorithms-JavaScript/pull/102
X: @github
direct link
Domain: github.com
IPv4 address: 140.82.114.3
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:28631a57-974d-c702-6169-10c4a304118f |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | E462:F286:308AB94:40C0A29:6B06DAD5 |
| html-safe-nonce | f0b7444d90b9cbe32e42ef44fda5073ca16dc97380c12d6d8a7d04bf42e1eb99 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNDYyOkYyODY6MzA4QUI5NDo0MEMwQTI5OjZCMDZEQUQ1IiwidmlzaXRvcl9pZCI6IjY2NTA0MzY4MDI5ODM2ODA3MjUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | e20877b79945db55b86134ee92d2bd8cf49557f3af4920d8d95a094c6a76a7c5 |
| hovercard-subject-tag | pull_request:5450913163 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | ///pull_requests/show/files |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/S-AI-Projects/TheAlgorithms-JavaScript/pull/102/files |
| twitter:image | https://avatars.githubusercontent.com/u/175632707?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/175632707?s=400&v=4 |
| og:image:alt | Description
Task
R50-T004 · task 4 of 10 · Invariant/property checks
Issue
#4 · Test an invariant of swap
Student
Stavan Somaiya · URN e26b07f1064
File → function
Sorts/OddEvenSort.j... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 06cadd0061c549662a50be90eb5baba7608f00f521574931eec01db0deb9e636 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/S-AI-Projects/TheAlgorithms-JavaScript git https://github.com/S-AI-Projects/TheAlgorithms-JavaScript.git |
| octolytics-dimension-user_id | 351892385 |
| octolytics-dimension-user_login | S-AI-Projects |
| octolytics-dimension-repository_id | 1444142713 |
| octolytics-dimension-repository_nwo | S-AI-Projects/TheAlgorithms-JavaScript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | true |
| octolytics-dimension-repository_parent_id | 97086543 |
| octolytics-dimension-repository_parent_nwo | TheAlgorithms/JavaScript |
| octolytics-dimension-repository_network_root_id | 97086543 |
| octolytics-dimension-repository_network_root_nwo | TheAlgorithms/JavaScript |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 6953c712585a8d7406b7695e48fffcb670fd241d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
| Skip to content | https://github.com/S-AI-Projects/TheAlgorithms-JavaScript/pull/102/files#start-of-content |
| https://github.com/ |
| Sign in | https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FS-AI-Projects%2FTheAlgorithms-JavaScript%2Fpull%2F102%2Ffiles |
| GitHubRepository hosting, code review, and collaboration | https://github.com/platform |
| CopilotAI coding agent for tasks, projects, and automated work | https://github.com/features/copilot |
| ActionsCI/CD and automation | https://github.com/features/actions |
| Code QualityQuality analysis, fixes, and enforcement | https://github.com/features/code-quality |
| CodespacesCloud development environments | https://github.com/features/codespaces |
| Code SecurityVulnerability detection and remediation | https://github.com/security/advanced-security/code-security |
| Secret ProtectionSecret scanning and leak prevention | https://github.com/security/advanced-security/secret-protection |
| All Features | https://github.com/features |
| Documentation | https://docs.github.com/en |
| Training | https://learn.github.com/skills |
| Certifications | https://learn.github.com/credentials |
| Build with Copilot | https://github.com/features/ai |
| Customize Copilot | https://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview |
| Integrations | https://github.com/marketplace |
| Trending repos | https://github.com/trending |
| GitHub Sponsors | https://github.com/open-source/sponsors |
| Developer articles | https://github.com/resources/articles |
| ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place. | https://github.blog/changelog/ |
| Enterprises | https://github.com/enterprise |
| Team | https://github.com/team |
| Startups | https://github.com/enterprise/startups |
| Nonprofits | https://github.com/solutions/industry/nonprofits |
| Healthcare | https://github.com/solutions/industry/healthcare |
| Financial services | https://github.com/solutions/industry/financial-services |
| Manufacturing | https://github.com/solutions/industry/manufacturing |
| Government | https://github.com/solutions/industry/government |
| See all industries | https://github.com/solutions/industry |
| Why GitHub | https://github.com/why-github |
| Customer Stories | https://github.com/customer-stories |
| Business insights | https://github.com/solutions/executive-insights |
| Trust Center | https://github.com/trust-center |
| GitHub Advanced SecurityEnterprise-grade code security | https://github.com/security/advanced-security |
| Copilot for businessEnterprise-grade AI features | https://github.com/features/copilot/copilot-business |
| Premium SupportEnterprise-grade 24/7 support | https://github.com/enterprise/premium-support |
| Documentation | https://docs.github.com/en |
| Resource center | https://github.com/resources |
| Blog | https://github.blog/ |
| Events & webinars | https://github.com/resources/events |
| Community Forum | https://github.com/orgs/community/discussions |
| Customer Stories | https://github.com/customer-stories |
| Integrations | https://github.com/marketplace |
| Customer support | https://help.github.com/ |
| Training | https://learn.github.com/skills |
| GitHub Status | https://www.githubstatus.com/ |
| About | https://github.com/about |
| Partners | https://github.com/partners |
| Changelog | https://github.blog/changelog/ |
| GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub. | https://githubuniverse.com/ |
| Pricing | https://github.com/pricing |
| Sign in | https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FS-AI-Projects%2FTheAlgorithms-JavaScript%2Fpull%2F102%2Ffiles |
| Sign up | https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=S-AI-Projects%2FTheAlgorithms-JavaScript |
| Reload | https://github.com/S-AI-Projects/TheAlgorithms-JavaScript/pull/102/files |
| Reload | https://github.com/S-AI-Projects/TheAlgorithms-JavaScript/pull/102/files |
| Reload | https://github.com/S-AI-Projects/TheAlgorithms-JavaScript/pull/102/files |
| S-AI-Projects | https://github.com/S-AI-Projects |
| TheAlgorithms-JavaScript | https://github.com/S-AI-Projects/TheAlgorithms-JavaScript |
| Code | https://github.com/S-AI-Projects/TheAlgorithms-JavaScript |
| Issues50 (50) | https://github.com/S-AI-Projects/TheAlgorithms-JavaScript/issues |
| Pull requests50 (50) | https://github.com/S-AI-Projects/TheAlgorithms-JavaScript/pulls |
| Actions | https://github.com/S-AI-Projects/TheAlgorithms-JavaScript/actions |
| Projects | https://github.com/S-AI-Projects/TheAlgorithms-JavaScript/projects |
| Security and quality | https://github.com/S-AI-Projects/TheAlgorithms-JavaScript/security |
| Insights | https://github.com/S-AI-Projects/TheAlgorithms-JavaScript/insights |
| Sign up for GitHub
| https://github.com/signup?return_to=%2FS-AI-Projects%2FTheAlgorithms-JavaScript%2Fissues%2Fnew%2Fchoose |
| terms of service | https://docs.github.com/terms |
| privacy statement | https://docs.github.com/privacy |
| Sign in | https://github.com/login?return_to=%2FS-AI-Projects%2FTheAlgorithms-JavaScript%2Fissues%2Fnew%2Fchoose |
| stavansomaiya | https://github.com/stavansomaiya |
| S-AI-Projects:master | https://github.com/S-AI-Projects/TheAlgorithms-JavaScript/tree/master |
| stavansomaiya:student/e26b07f1064/R50-T004 | https://github.com/stavansomaiya/TheAlgorithms-JavaScript/tree/student/e26b07f1064/R50-T004 |
|
Conversation
0
| https://github.com/S-AI-Projects/TheAlgorithms-JavaScript/pull/102 |
|
Commits
1
| https://github.com/S-AI-Projects/TheAlgorithms-JavaScript/pull/102/commits |
|
Checks
0
| https://github.com/S-AI-Projects/TheAlgorithms-JavaScript/pull/102/checks |
|
Files changed
| https://github.com/S-AI-Projects/TheAlgorithms-JavaScript/pull/102/files |
| Please reload this page | https://github.com/S-AI-Projects/TheAlgorithms-JavaScript/pull/102/files |
|
R50-T004: Test an invariant of swap (OddEvenSort.js) [Sorts/OddEvenSort.js]
| https://github.com/S-AI-Projects/TheAlgorithms-JavaScript/pull/102/files#top |
|
Show all changes
1 commit
| https://github.com/S-AI-Projects/TheAlgorithms-JavaScript/pull/102/files |
|
2edbea6
test(OddEvenSort): add seeded invariant tests for swap (R50-T004)
stavansomaiya Nov 23, 2026
| https://github.com/S-AI-Projects/TheAlgorithms-JavaScript/pull/102/commits/2edbea66125b0d6779d9b16fa1be7d1d8af40bbb |
|
Clear filters
| https://github.com/S-AI-Projects/TheAlgorithms-JavaScript/pull/102/files |
| Please reload this page | https://github.com/S-AI-Projects/TheAlgorithms-JavaScript/pull/102/files |
| Please reload this page | https://github.com/S-AI-Projects/TheAlgorithms-JavaScript/pull/102/files |
|
OddEvenSort.js
| https://github.com/S-AI-Projects/TheAlgorithms-JavaScript/pull/102/files#diff-2610463053ffbf21ce307f4097f743bb14a9731abb5c3a72d479e8aa390cd72d |
|
OddEvenSort.test.js
| https://github.com/S-AI-Projects/TheAlgorithms-JavaScript/pull/102/files#diff-b33377656eeec2e9cf41c5c26e80e7f305f8ebee1bbcc275db43a3e97234fd3b |
|
README.md
| https://github.com/S-AI-Projects/TheAlgorithms-JavaScript/pull/102/files#diff-b5569cee4d2c0782c7c1fbb3c72e81da265c3ee1c1b8330fadca6b7f1fd633f8 |
|
check.py
| https://github.com/S-AI-Projects/TheAlgorithms-JavaScript/pull/102/files#diff-68b3364d699d2dab86fc7356d5d7f0b0029365a1896f51b9257f579326c5117f |
|
commands.log
| https://github.com/S-AI-Projects/TheAlgorithms-JavaScript/pull/102/files#diff-c54d8907065bdbc409df8f305c32d8bbc5311a4d6b9ea230d3705e67c48120db |
|
evidence.mjs
| https://github.com/S-AI-Projects/TheAlgorithms-JavaScript/pull/102/files#diff-dcaecf0dd4b338cd647444447cfeb4ad2a8af62251b12cb8afb5d62afbfd37a3 |
|
results.json
| https://github.com/S-AI-Projects/TheAlgorithms-JavaScript/pull/102/files#diff-3e70d1d39e2e9a052841f9b35874b589f9d47bb6c69222d03cddb1b3e4b5aa08 |
|
task.json
| https://github.com/S-AI-Projects/TheAlgorithms-JavaScript/pull/102/files#diff-775951c7edd495306c155b6ce07c4a6d2f9aa9bfa419de102ad001bd5aedf286 |
|
versions.txt
| https://github.com/S-AI-Projects/TheAlgorithms-JavaScript/pull/102/files#diff-8c1514b21df79b6dad7d8703dc356c4bca2ce44f0d8f3b25ce4fb0dc8bd9ff05 |
|
vitest-focused.json
| https://github.com/S-AI-Projects/TheAlgorithms-JavaScript/pull/102/files#diff-4bad72921482979263352f20ed8d4fc583e5211f4817b8d4f6f747593aad813a |
| Sorts/OddEvenSort.js | https://github.com/S-AI-Projects/TheAlgorithms-JavaScript/pull/102/files#diff-2610463053ffbf21ce307f4097f743bb14a9731abb5c3a72d479e8aa390cd72d |
|
View file
| https://github.com/S-AI-Projects/TheAlgorithms-JavaScript/blob/2edbea66125b0d6779d9b16fa1be7d1d8af40bbb/Sorts/OddEvenSort.js |
|
Open in desktop
| https://desktop.github.com |
| https://github.co/hiddenchars |
| https://github.com/S-AI-Projects/TheAlgorithms-JavaScript/pull/102/{{ revealButtonHref }} |
|
| https://github.com/S-AI-Projects/TheAlgorithms-JavaScript/pull/102/files#diff-2610463053ffbf21ce307f4097f743bb14a9731abb5c3a72d479e8aa390cd72d |
|
| https://github.com/S-AI-Projects/TheAlgorithms-JavaScript/pull/102/files#diff-2610463053ffbf21ce307f4097f743bb14a9731abb5c3a72d479e8aa390cd72d |
| Sorts/test/OddEvenSort.test.js | https://github.com/S-AI-Projects/TheAlgorithms-JavaScript/pull/102/files#diff-b33377656eeec2e9cf41c5c26e80e7f305f8ebee1bbcc275db43a3e97234fd3b |
|
View file
| https://github.com/S-AI-Projects/TheAlgorithms-JavaScript/blob/2edbea66125b0d6779d9b16fa1be7d1d8af40bbb/Sorts/test/OddEvenSort.test.js |
|
Open in desktop
| https://desktop.github.com |
| https://github.co/hiddenchars |
| https://github.com/S-AI-Projects/TheAlgorithms-JavaScript/pull/102/{{ revealButtonHref }} |
|
| https://github.com/S-AI-Projects/TheAlgorithms-JavaScript/pull/102/files#diff-b33377656eeec2e9cf41c5c26e80e7f305f8ebee1bbcc275db43a3e97234fd3b |
| work/R50-T004/README.md | https://github.com/S-AI-Projects/TheAlgorithms-JavaScript/pull/102/files#diff-b5569cee4d2c0782c7c1fbb3c72e81da265c3ee1c1b8330fadca6b7f1fd633f8 |
|
View file
| https://github.com/S-AI-Projects/TheAlgorithms-JavaScript/blob/2edbea66125b0d6779d9b16fa1be7d1d8af40bbb/work/R50-T004/README.md |
|
Open in desktop
| https://desktop.github.com |
| https://github.co/hiddenchars |
| https://github.com/S-AI-Projects/TheAlgorithms-JavaScript/pull/102/{{ revealButtonHref }} |
| Please reload this page | https://github.com/S-AI-Projects/TheAlgorithms-JavaScript/pull/102/files |
|
| https://github.com |
| Terms | https://docs.github.com/site-policy/github-terms/github-terms-of-service |
| Privacy | https://docs.github.com/site-policy/privacy-policies/github-privacy-statement |
| Security | https://github.com/security |
| Status | https://www.githubstatus.com/ |
| Community | https://github.community/ |
| Docs | https://docs.github.com/ |
| Contact | https://support.github.com?tags=dotcom-footer |
Response headers:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | no-cache |
Viewport: width=device-width
URLs of crawlers that visited me.