Skip to content

Commit 537f4a9

Browse files
committed
Fix
1 parent f16f6eb commit 537f4a9

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/main/java/com/thealgorithms/scheduling/RandomScheduling.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package com.thealgorithms.scheduling;
22

33
import java.util.ArrayList;
4+
import java.util.Collection;
45
import java.util.Collections;
56
import java.util.List;
67
import java.util.Random;
@@ -23,10 +24,10 @@ public final class RandomScheduling {
2324
/**
2425
* Constructs a new RandomScheduling instance.
2526
*
26-
* @param tasks A list of task names to be scheduled.
27+
* @param tasks A collection of task names to be scheduled.
2728
* @param random A Random instance for generating random numbers.
2829
*/
29-
public RandomScheduling(List<String> tasks, Random random) {
30+
public RandomScheduling(Collection<String> tasks, Random random) {
3031
this.tasks = new ArrayList<>(tasks); // Store tasks locally
3132
this.random = random;
3233
}

0 commit comments

Comments
 (0)