Skip to content

Commit fc69d05

Browse files
committed
expoloring all scenarios to find the least possible sadness level option
1 parent 2405f09 commit fc69d05

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

implement-laptop-allocation/main.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,11 @@ def sadness(person: Person, laptop: Laptop) ->int:
3333
return 100
3434

3535

36-
def allocate_laptops(people: List[Person], laptops: List[Laptop]) -> Dict[Person, Laptop]:
36+
def allocate_laptops(people: List[Person], laptops: List[Laptop]) -> Dict[Person, Laptop]:
37+
38+
best_scenario_assignment = None
39+
best_scenario_sadness = float("inf")
40+
41+
for scenario in scenarios(laptops):
42+
total_sadness = 0
43+

0 commit comments

Comments
 (0)