Question bank › Bit Manipulation
Dsa Bit Manipulation Medium

Next Greater Power of Two

For a given positive integer n, find the next greater power of two. If n is already a power of two, return n itself. For example: Input: 6 Output: 8 Explanation: The powers of two are 1, 2, 4, 8, ... The next greater power of two after 6 is 8.

Key concepts

bit manipulationpowers of two

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.