Skip to content

Commit e4ec608

Browse files
committed
Fix
1 parent 28be35c commit e4ec608

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ private static int findHighestResponseRatio(String[] processNames, int[] arrival
113113

114114
for (int i = 0; i < processNames.length; i++) {
115115
if (!finishedProcess[i] && arrivalTimes[i] <= currentTime) {
116-
double responseRatio = (double) (burstTimes[i] + (currentTime - arrivalTimes[i])) / burstTimes[i];
116+
double responseRatio = (double) (burstTimes[i] + currentTime - arrivalTimes[i]) / burstTimes[i];
117117
if (responseRatio > maxResponseRatio) {
118118
maxResponseRatio = responseRatio;
119119
loc = i;

0 commit comments

Comments
 (0)