InterviewSolution
Saved Bookmarks
| 1. |
What is the GCD according to the given Venn Diagram?(a) 2(b) 3(c) 5(d) 6This question was posed to me during an internship interview.This is a very interesting question from GCD LCM Recursion, in portion Recursion of Data Structures & Algorithms II |
|
Answer» CORRECT answer is (C) 5 For explanation: In terms of Venn Diagram, the GCD is given by the intersection of TWO sets. So A ꓵ B gives the GCD. While A U B gives the LCM. So here A ꓵ B is 5. |
|