mirror of
https://github.com/TheAlgorithms/Java.git
synced 2025-07-28 15:02:46 +08:00
Code cleanup (#4246)
This commit is contained in:
@ -11,9 +11,6 @@ public class MinimizingLateness {
|
||||
|
||||
int t = 0; // Time required for the operation to be performed
|
||||
int d = 0; // Time the job should be completed
|
||||
int s = 0; // Start time of the task
|
||||
int f = 0; // End time of the operation
|
||||
|
||||
public Schedule(int t, int d) {
|
||||
this.t = t;
|
||||
this.d = d;
|
||||
@ -46,8 +43,6 @@ public class MinimizingLateness {
|
||||
int tryTime = 0; // Total time worked
|
||||
int lateness = 0; // Lateness
|
||||
for (int j = 0; j < indexCount - 1; j++) {
|
||||
array[j].s = tryTime; // Start time of the task
|
||||
array[j].f = tryTime + array[j].t; // Time finished
|
||||
tryTime = tryTime + array[j].t; // Add total work time
|
||||
// Lateness
|
||||
lateness = lateness + Math.max(0, tryTime - array[j].d);
|
||||
|
Reference in New Issue
Block a user