Repository navigation
feat(strings): cross-check Isomorphic against independent reference o… - #43
Open
Sapna2007-sst wants to merge 1 commit into
Open
Sapna2007-sst wants to merge 1 commit into
Sapna2007-sst wants to merge 1 commit into
Conversation
…racle (R45-T003) - Explain representative isomorphic example in Isomorphic.java documentation - Implement independent reference oracle in IsomorphicTest using canonical first-occurrence index pattern encoding - Add parameterized cross-check tests over 22 distinct input pairs asserting consistency, symmetry, and explicit expected values - Cover smallest valid input (empty strings), ordinary input (egg/add), length mismatch domain boundary, and reflection instantiation - Add automated verification check runner work/R45-T003/check.py and verification evidence
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This pull request cross-checks
Isomorphicagainst an independent reference oracle based on canonical first-occurrence index pattern encoding, documents representative isomorphic behavior in source Javadoc, and adds focused regression and cross-check tests across more than 20 distinct input pairs.Related Issue
Fixes: #3
Type of Change
Changes Made
src/main/java/com/thealgorithms/strings/Isomorphic.java.src/test/java/com/thealgorithms/strings/IsomorphicTest.javausing first-occurrence index comparisons without utilizingMaporSet.("", "")returningtrue).("egg", "add")returningtrue).("abcdef", "abc")returningfalse).work/R45-T003/check.pyand saved verification evidence inwork/R45-T003/results.jsonandwork/R45-T003/evidence.md.Screenshots / Recordings
N/A (string algorithm utility and unit tests; non-UI)
Testing
All changes have been validated locally using JDK 21 and Maven:
mvn test -Dtest=IsomorphicTest(Tests run: 34, Failures: 0, Errors: 0, Skipped: 0)mvn checkstyle:check(0 Checkstyle violations)python3 work/R45-T003/check.py(All checks and cross-check assertions passed successfully)Checklist
mvn checkstyle:check.Additional Notes
work/R45-T003/evidence.md.python3 work/R45-T003/check.py.