Skip to content

Conversation

@Mikiyas-STP
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

Implement laptop allocation

Questions

none

@Mikiyas-STP Mikiyas-STP added Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. Module-Decomposition The name of the module. labels Oct 16, 2025
Copy link

@LonMcGregor LonMcGregor left a comment

Choose a reason for hiding this comment

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

Hi, good implementation, but I've left a comment where you might want to think about the efficiency of your solution.

for person in people:
for laptop in laptops:
if laptop.operating_system in person.preferred_operating_system:
sadness = person.preferred_operating_system.index(laptop.operating_system)

Choose a reason for hiding this comment

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

One thing to be aware of is efficiency of your solution. This works, but think about how long it will take to complete this. You have an example with about 3 people and laptops. How many times would this need to run if that increased?

Something to think about is when you know you have a suitable answer. If you find a matching laptop, do you need to keep checking every other one?

@LonMcGregor LonMcGregor 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 Oct 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Module-Decomposition The name of the module. Reviewed Volunteer to add when completing a review with trainee action still to take.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants