Question bank › Bit Manipulation
Dsa Bit Manipulation Medium

Check if Power of Three

Write a function that checks if a given positive integer n is a power of three or not without using any loops or recursion. For example: Input: 27 Output: True Explanation: 27 is 3^3, which is a power of three.

Key concepts

bit manipulationmathematical properties

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.