Repository navigation
docs(strings): publish executable worked example for SuffixArray (R45… - #47
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
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.
clang-format -i --style=file path/to/your/file.javaDescription
This pull request resolves task R45-T007 / Issue #7 by documenting and publishing an executable worked example for$k=1, 2, 4$ ), the decisive state transition at $k=2$ where all rank pairs become unique, and the final suffix index mapping. Corresponding regression tests assert the step-by-step invariants, display representations, smallest valid input fixture (
SuffixArray.javausing the representative input"banana". The documentation explains the initial rank assignment, the rank doubling process ("a"), null input preconditions, and reflection constructor instantiation.Related Issue
Closes #7
Related to: #7
Type of Change
Changes Made
Documentation (
SuffixArray.java):"banana"(length'a' -> 0,'b' -> 1,'n' -> 2)."a"):[5]"ana"):[3]"anana"):[1]"banana"):[0]"na"):[4]"nana"):[2][5, 3, 1, 0, 4, 2]Automated Unit & Regression Tests (
SuffixArrayTest.java):testSmallestValidInputFixture: Verifies the smallest valid non-empty string input ("a"), asserting returned suffix array is[0].testDocumentedWorkedExampleBananaExecutionAndDisplayedOutput: Verifies the execution of"banana", checking that returned array indices match[5, 3, 1, 0, 4, 2], verifying sorted suffix substring ordering, and asserting the string representation matches the documentation.testNullInputThrowsNullPointerException: Verifies boundary precondition behavior whennullinput is passed.testPrivateConstructorContract: Reflection contract test verifying private constructor encapsulation.Automated Verification Harness (
work/R45-T007/):check.pyrunner logging environment metadata (Python 3.15, OpenJDK 21, Maven 3.10) and executingmvn test -Dtest=SuffixArrayTest.results.jsonandevidence.mdconfirming 10/10 tests passing with 0 failures, 0 errors, and 0 checkstyle violations.Screenshots / Recordings