Skip to content

Commit 95e0e1d

Browse files
committed
Adding comment about modifying laptop list
1 parent 6369bda commit 95e0e1d

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

laptop_allocation.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ class Laptop:
4646

4747

4848
# Allocate laptops to people to minimize total sadness
49+
# NOTE: laptops list is modified on purpose.
50+
# After allocation, it shows the laptops that are still left.
51+
4952
def allocate_laptops(people: List[Person], laptops: List[Laptop]) -> Dict[Person, Laptop]:
5053
sorted_people_OS_count=sorted(people,key=lambda p:len(p.preferred_operating_system))
5154
sadness=0 # local variable sadness counter

0 commit comments

Comments
 (0)