Skip to content

London | 25-SDC-July | Rihanna Poursoltani | Sprint 2 | Improve code with precomputing#89

Open
RihannaP wants to merge 2 commits intoCodeYourFuture:mainfrom
RihannaP:sprint2-improve-with-precomputing
Open

London | 25-SDC-July | Rihanna Poursoltani | Sprint 2 | Improve code with precomputing#89
RihannaP wants to merge 2 commits intoCodeYourFuture:mainfrom
RihannaP:sprint2-improve-with-precomputing

Conversation

@RihannaP
Copy link

Learners, PR Template

Self checklist

  • I have titled my PR with Region | Cohort | FirstName LastName | Sprint | Assignment Title
  • My changes meet the requirements of the task
  • I have tested my changes
  • My changes follow the style guide

Changelist

For optimising I tried to

  • Store the list and the compare only with neighbours
  • I added a set of all char and then check if a lowercase letter exists

Questions

No question

@RihannaP RihannaP added 📅 Sprint 2 Assigned during Sprint 2 of this module Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. Module-Complexity The name of the module. labels Jan 30, 2026
Copy link

@cjyuan cjyuan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good. Can you explain using big-O notation why your approach is better?

@cjyuan 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 Feb 15, 2026
if len(strings) < 2:
return ""

strings.sort()
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

strings.sort() can modify the original list passed into the function by the caller.
How can you prevent this side effect?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Module-Complexity The name of the module. Reviewed Volunteer to add when completing a review with trainee action still to take. 📅 Sprint 2 Assigned during Sprint 2 of this module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants