---
title: "Discussion on \"Power of Two, A Google Interview Question - Java Solution\" | Hashnode"
description: "Discussion on \"Power of Two, A Google Interview Question - Java Solution\". In this Power Of Two probelm , we will try to check if the given number is a power of 2 using bit tricks in O(1) time."
url: "https://hashnode.com/posts/power-of-two-a-google-interview-question-java-solution/6221e8215998063ea60d7bf9"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Power of Two, A Google Interview Question - Java Solution](https://ggorantala.hashnode.dev/power-of-two-a-google-interview-question-java-solution?utm_source=hashnode&utm_medium=feed)

In this Power Of Two probelm , we will try to check if the given number is a power of 2 using bit tricks in O(1) time.

Mar 4, 2022 · 5 min read · ggorantala.hashnode.dev  
Updated Mar 6, 2022  
Read the article

-   [#algorithms](https://hashnode.com/tag/algorithms)
-   [#java](https://hashnode.com/tag/java)
-   [#coding-challenge](https://hashnode.com/tag/coding-challenge)
-   [#beginners](https://hashnode.com/tag/beginners)
-   [#programming](https://hashnode.com/tag/programming)

## Written by

[Gopi Gorantala](https://hashnode.com/@ggorantala)

@ggorantala · Brussels, Belgium

  
[View profile](https://hashnode.com/@ggorantala)

Full Stack Developer, Content Creator, Freelancer

Full Stack Developer • Content Creator • educative.io/200K-audience . https://ggorantala.dev

## Responses 1

Markdown supported · ⌘↵ to post

[Rahul Ahuja](https://hashnode.com/@rahulahuja)

[Feb 16, 2023](https://hashnode.com/posts/power-of-two-a-google-interview-question-java-solution/6221e8215998063ea60d7bf9/comment/63ee20fe46e2f1644c4f12bd)

These are all really important concepts which are important for the interview. Thanks for sharing with the community. Here are also some Java interview questions which are frequently asked: [blog.geekster.in/15-java-interview-questions](https://blog.geekster.in/15-java-interview-questions/)
