Skip to content

Conversation

@RahwaZeslusHaile
Copy link

@RahwaZeslusHaile RahwaZeslusHaile commented Dec 8, 2025

Manchester | 25-SDC-Nov | Rahwa Haile | Sprint 5 |implement laptop allocation

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 algorithm and detailed output

  • Added allocate_laptops function to assign laptops to people minimizing total sadness
  • Used brute-force permutations approach for small datasets
  • Updated Person dataclass to use tuple for preferred_operating_system (hashable)
  • Printed each person's allocated laptop with individual sadness score

Questions

This solution is good for small data, but it doesn't scale because permutations grow factorially. The SciPy/Hungarian way to solve the problem is polynomial time and stays fast even with more laptops/people. Which approach do you prefer for this version?
Please review my work — thank you!

@RahwaZeslusHaile RahwaZeslusHaile added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Dec 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant