We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6af42f5 commit 76131deCopy full SHA for 76131de
DiskScheduling/clook.py
@@ -11,7 +11,7 @@
11
start = min(arr)
12
end = max(arr) #Start and End of Head Positions
13
print(hp, end='')
14
-if(hp<100):
+if((abs(hp-start))<(abs(hp-end))):
15
for i in range(pos, start-1, -1): #Iterates the movement from initial to start of disk
16
if i in arr:
17
thm+= abs(pos-i)
DiskScheduling/look.py
0 commit comments