Why is the brute-force approach less ideal here?
Practice this question from GCD - Euclidean Remainder Pattern Practice Quiz, with options and an explanation.
Question
Why is the brute-force approach less ideal here?
Option A — Correct answer
Scanning every possible divisor can be slow.
Option B
It always has better space complexity
Option C
It skips reading some inputs
Option D
It only works on strings
Explanation
Scanning every possible divisor can be slow.