edited by
1,188 views
1 votes
1 votes

I got LOOK ==> 260

CSCAN ==> 383

edited by

2 Answers

1 votes
1 votes
Head movement of LOOK algorithm is :$(105-100)+(110-105)+(126-110)+(135-126)+(195-135)+(195-85)+(85-55)+(55-30)$

Total distance for LOOK algorithm: $260$

Head movement of CSCAN algorithm:$(105-100)+(110-105)+(126-110)+(135-126)+(195-135)+(199-195)+(199-0)+(30-0)+(55-30)+(85-55)$

Total distance for CSCAN= $383$

So the difference is : $383-260=123$
0 votes
0 votes
There is a pattern if we observe carefully.

(195-199)*2 + 30 + 85 = 123.

Related questions

0 votes
0 votes
1 answer
4