?? Day 2: Power of Two

?? Day 2: Power of Two

?? Problem Statement:

Given an integer n, return true if it is a power of two, otherwise return false.

A number is a power of two if it can be written as 2^x, where x is an integer. For example:

1 is a power of two (since 2^0 = 1).

16 is a power of two (since 2^4 = 16).

3 is not a power of two.

? Like, Share, Comment, Feedback & Subscribe for More! Feel free to share your thoughts and follow along with the challenge. Let’s learn and improve together!

?? #100DaysLeetCode #LeetCodeChallenge #Python #PythonCoding #DSA #ProblemSolving #CodingJourney #Disha100DaysChallenge

要查看或添加评论,请登录

Disha Khanpara的更多文章

  • ??Day 6:-Two Sum

    ??Day 6:-Two Sum

    I’m back! Took a short break, but now it’s time to get back on track. The next two weeks are all about consistency, and…

  • ??Day 5:-Water Bottles

    ??Day 5:-Water Bottles

    ?? Problem Statement: Water Bottles You have numBottles full water bottles. After drinking a bottle, it becomes empty.

    2 条评论
  • ?? Day 4: Tribonacci Number

    ?? Day 4: Tribonacci Number

    ?? Problem Statement: The Tribonacci sequence is defined as: ?? T(0) = 0, T(1) = 1, T(2) = 1 ?? T(n) = T(n - 1) + T(n -…

  • ?? Day 3: Fibonacci Number

    ?? Day 3: Fibonacci Number

    ?? Problem Statement: The Fibonacci numbers, commonly denoted F(n), form a sequence, called the Fibonacci sequence…

    3 条评论
  • 100 Days of LeetCode: "Day 1 - Palindrome Number"

    100 Days of LeetCode: "Day 1 - Palindrome Number"

    Hello everyone! ?? Today, I’m beginning my 100 Days LeetCode Challenge and wanted to share it with you. For the next…

  • DO EPIC SHIT Book by Ankur Warikoo

    DO EPIC SHIT Book by Ankur Warikoo

    "Do Epic Shit" by Ankur Warikoo is a remarkable book brimming with invaluable life lessons. It commences with profound…

    4 条评论

社区洞察

其他会员也浏览了