Skip to content

Commit b4c1d7e

Browse files
committed
Fix
1 parent 27e7dbb commit b4c1d7e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/test/java/com/thealgorithms/scheduling/NonPreemptivePrioritySchedulingTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public void testCalculateAverageWaitingTime() {
2323

2424
NonPreemptivePriorityScheduling.Process[] executionOrder = NonPreemptivePriorityScheduling.scheduleProcesses(processes);
2525

26-
double expectedAvgWaitingTime = (0 + 10 + 15) / 3.0; // (0 + 10 + (10 + 8)) / 3
26+
double expectedAvgWaitingTime = 6.666666666666667
2727
double actualAvgWaitingTime = NonPreemptivePriorityScheduling.calculateAverageWaitingTime(processes, executionOrder);
2828

2929
assertEquals(expectedAvgWaitingTime, actualAvgWaitingTime, 0.01, "Average waiting time should be calculated correctly.");

0 commit comments

Comments
 (0)