Birmingham | 25-ITP-Sept | Khor Biel | Sprint 1 | module-data-group/sprint-1#819
Closed
wankoak wants to merge 10 commits intoCodeYourFuture:mainfrom
Closed
Birmingham | 25-ITP-Sept | Khor Biel | Sprint 1 | module-data-group/sprint-1#819wankoak wants to merge 10 commits intoCodeYourFuture:mainfrom
wankoak wants to merge 10 commits intoCodeYourFuture:mainfrom
Conversation
- Fix calculateMedian to handle sorting, filtering, and edge cases - Implement dedupe to remove duplicates while preserving order - Implement findMax to find maximum number ignoring non-numerics - Implement sum to calculate total ignoring non-numerics - Fix test files by replacing test.todo with proper test implementations
Contributor
|
Can you check if any of this general feedback can help you further improve your code? Doing so can help reviewers speed up the review process. Thanks. |
Author
|
@cjyuan thanks for the feedback, I've read the feedback.md and it is really helpful |
cjyuan
reviewed
Nov 20, 2025
…tering - Only keep finite numeric values using Number.isFinite() - Remove redundant [...numbers] clone since .filter() already creates a new array - Add clearer comments about non-mutation and sorting behavior - Preserve expected behaviour: return null for invalid or empty numeric inputs
- Use typeof === "number" and Number.isFinite to keep only actual finite numbers - Remove unnecessary .map(Number) after filtering - Return -Infinity when no numeric values are present - Add defensive guard for non-array inputs
- Filters array to keep only real numbers - Returns -Infinity when no numbers are present - Preserves behavior for decimals, negatives, and mixed arrays
…ber tests - Filter now only includes finite numbers - Decimal sums use toBeCloseTo for precision - Removed duplicate or meaningless tests
- Replace index-based loop with a clearer for...of loop - Return false early for non-array inputs to avoid runtime errors - Keep behaviour identical: returns true if target found, otherwise false
Author
|
@cjyuan i made small changes based on your feedback, check them and tell me your feedback if they need fixing |
cjyuan
reviewed
Nov 21, 2025
Contributor
cjyuan
left a comment
There was a problem hiding this comment.
Changes look great. Well done!
Author
|
@cjyuan thanks a lot, changes wouldn't be great without your eyes-opening feedbacks. |
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.
Self checklist
Changelist
No question