Question bank › Math
Dsa Math Easy

Prime Factor Count

Write a function that counts the number of distinct prime factors of a given integer N. The function should read N and output the number of distinct prime factors. Input: An integer N (2 <= N <= 100000). Output: The count of distinct prime factors of N. Example: Input: 12 Output: 2

Key concepts

primefactors

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 Praxari's verified interview question bank. We show the prompt and concepts to practise with — never a copy-paste solution.