Skip to content

Commit 57fbc03

Browse files
committed
Rename x to activity
1 parent 2364494 commit 57fbc03

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

greedy_methods/activity_selection.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def activity_selection(activities: list[tuple[int, int]]) -> list[tuple[int, int
3737
"""
3838

3939
# Step 1: Sort the activities by their end time
40-
sorted_activities = sorted(activities, key=lambda x: x[1])
40+
sorted_activities = sorted(activities, key=lambda activity: activity[1])
4141

4242
# Step 2: Select the first activity (the one that finishes the earliest)
4343
# as the initial activity

0 commit comments

Comments
 (0)