Question bank › Math
Dsa Math Medium

Unique Prime Factor Count

You are given a list of integers. Your task is to determine the number of unique prime factors for each integer in the list and output the results in the same order. The input consists of a single integer N followed by N integers. The output should be a list of integers representing the count of unique prime factors for each input integer. Example Input: 3 12 15 20 Example Output: 2 3 2

Key concepts

mathfactors

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.