You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The reason will be displayed to describe this comment to others. Learn more.
Code looks good.
Could you use Big O notation to quantify the improvement achieved by the new implementation? A brief comparison of the time complexity before and after the change would be helpful.
cjyuan
added
Reviewed
Volunteer to add when completing a review with trainee action still to take.
and removed
Needs Review
Trainee to add when requesting review. PRs without this label will not be reviewed.
labels
Jun 22, 2026
TzeMingHo
added
Needs Review
Trainee to add when requesting review. PRs without this label will not be reviewed.
and removed
Reviewed
Volunteer to add when completing a review with trainee action still to take.
labels
Jun 23, 2026
The reason will be displayed to describe this comment to others. Learn more.
O(n log n) is the optimal average-case time complexity achievable by any comparison-based sorting algorithm.
An O(n) complexity approach is possible but that would involve writing a lot of code. 😄
cjyuan
added
Reviewed
Volunteer to add when completing a review with trainee action still to take.
and removed
Needs Review
Trainee to add when requesting review. PRs without this label will not be reviewed.
labels
Jun 23, 2026
TzeMingHo
added
Needs Review
Trainee to add when requesting review. PRs without this label will not be reviewed.
and removed
Reviewed
Volunteer to add when completing a review with trainee action still to take.
labels
Jun 23, 2026
cjyuan
added
Complete
Volunteer to add when work is complete and all review comments have been addressed.
and removed
Needs Review
Trainee to add when requesting review. PRs without this label will not be reviewed.
labels
Jun 23, 2026
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
CompleteVolunteer to add when work is complete and all review comments have been addressed.📅 Sprint 2Assigned during Sprint 2 of this module
3 participants
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.
Learners, PR Template
Self checklist
Changelist
I have attempted with sorted and set