Class IX · NCERTShort answermedium Sign in for help

Ch 11 · The World of Algorithms · Exercise Set 11.2 · 9 of 12 in this chapter

Let m=6m = 6, n=12n = 12.
– min⁡(6,12)=6\min(6, 12) = 6
– Initially set most-recent-common-divisor to 1
– k = 2 divides both 6 and 12. Update: most-recent-common-divisor to 2.
– k = 3 divides both 6 and 12. Update: most-recent-common-divisor to 3.
– k = 4 doesnot divide 6. most-recent-common-divisor remains 3.
– k = 5 doesnot divide 6. most-recent-common-divisor remains 3.
– k = 6 divides both 6 and 12. Update: most-recent-common-divisor to 6.
Scan complete. gcd(6, 12) = 6
Book
NCERT
Exercise
Set 11.2
Hints
3
Solution
Locked

Sign in to see hints, the full solution and the answer check. A free account covers Class 9–10 NCERT.

Sign in

Sign in to mark questions solved and keep a streak.