Repository navigation
saddle-points: explain primitive vs boxed values in getRowMax (R58-T007) - #87
Open
utkarsh21022009-boop wants to merge 1 commit into
Open
utkarsh21022009-boop wants to merge 1 commit into
utkarsh21022009-boop 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.
Pull Request
Pull Request
R58-T007: saddle-points: explain primitive vs boxed values in getRowMax and record verification evidence
Description
Provides learner guidance connecting the$[-128, 127]$ cache). Implemented an automated verification check that exercises the full canonical test suite in an isolated scratch directory without modifying the working tree learner stub.
saddle-pointsexercise specification to Java language constructs for Task R58-T007. Examined collection mutation, primitive versus boxed values, and exception contracts; identified thatgetRowMaxin the reference implementation specifically relies on automatic unboxing from boxedIntegerto primitiveint. Developed a standalone micro-example demonstrating correct primitive value comparison alongside an exercise-relevant pitfall (boxedIntegerreference identity comparison with==failing outside theRelated Issue
Fixes: #7
Type of Change
Changes Made
exercises/practice/saddle-points/.docs/hints.md:List<List<Integer>>representation.getRowMax.Collections.maxauto-unboxing tointand numeric comparison with==(true).Integerpitfall where comparing instances representing 128 with==yieldsfalsedue to object reference identity comparison and the JLS §5.1.7 Integer cache boundary.docs/maintenance/saddle-points.md:work/R58-T007/SaddlePointsBoxedPrimitiveExample.java:trueandfalseas asserted by the checker.work/R58-T007/check.py:config.json.UnsupportedOperationException) and pristine.["true", "false"]matching published hint.tools/course_checks/r58-t007.py:work/R58-T007/check.py.work/R58-T007/README.md:work/R58-T007/results.jsonandlatest-result.json:Screenshots / Recordings
Not applicable — no UI changes.
Testing
python3 work/R58-T007/check.pyandpython3 tools/course_checks/r58-t007.py../gradlew test --no-daemon:javacand executed withjava:['true', 'false'].exercises/practice/saddle-points/src/main/java/Matrix.javaverified untouched and unsolved (UnsupportedOperationException).Checklist
Additional Notes
student/e26b07f0710/R58-007(andR58-T007/student/e26b07f0710-R58-T007).S-AI-Projects/exercism-javaonmain.Reviewer Resources:
Track Policies
Reviewer Resources:
Track Policies