We can terminate immediately upon finding the very first common divisor. Since we count down from min(m, n), that first common factor is guaranteed to be the greatest common divisor without further scanning.
Class 9 Chapter 11 The World of Algorithms solutions
Class 9 Maths Ganita Manjari Part 2 Book and Solutions
Working backwards from min(m, n) down to 1 allows the algorithm to stop early. The very first number encountered that divides both m and n is guaranteed to be the largest common factor. We can immediately report this number as the GCD and terminate the process, completely eliminating the need to examine the remaining numbers all the way down to 1.
For more NCERT Solutions of Class 9 Maths Ganita Manjari Part 2 Chapter 11 The World of Algorithms Question Answer (2026-27)
https://www.tiwariacademy.com/ncert-solutions/class-9/maths/ganita-manjari-chapter-11/