Question bank › Math
Dsa Math Easy

Finding GCD of All Elements

Given a list of positive integers, find the greatest common divisor (GCD) of all elements in the list. Input: - A single line containing space-separated positive integers. Output: - An integer representing the GCD of the given integers. Example: Input: 12 15 9 Output: 3

Key concepts

mathgcdarray

Practise this out loud — free

Start a mock interview on THIS exact question — a voice AI interviewer opens with it, pushes back like a real onsite, then hands you an instant scorecard.

🎙 Practise this question now
Part of InterviewLab's verified interview question bank. We show the prompt and concepts to practise with — never a copy-paste solution.