Skip to content

Conversation

@Shewale41
Copy link

@Shewale41 Shewale41 commented Oct 30, 2025

Description

This PR adds an implementation to check whether a number is a power of four
using bit manipulation.

The algorithm ensures that:

  • The number is positive.
  • It has exactly one set bit.
  • The set bit is at an even position.

Type of change

  • New Algorithm / Data Structure

Checklist

  • Code follows TheAlgorithms/Java style and package structure
  • SpotBugs, Checkstyle, and CodeQL pass successfully
  • Added comprehensive JUnit test cases
  • Added Javadoc documentation
  • Verified output with multiple test examples

@codecov-commenter
Copy link

Codecov Report

❌ Patch coverage is 92.06349% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 78.39%. Comparing base (21eff8a) to head (f58388c).
⚠️ Report is 5 commits behind head on master.

Files with missing lines Patch % Lines
...ithms/datastructures/trees/ThreadedBinaryTree.java 90.19% 2 Missing and 3 partials ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #6999      +/-   ##
============================================
+ Coverage     78.26%   78.39%   +0.12%     
- Complexity     6573     6639      +66     
============================================
  Files           743      749       +6     
  Lines         21895    22078     +183     
  Branches       4288     4331      +43     
============================================
+ Hits          17137    17308     +171     
- Misses         4074     4080       +6     
- Partials        684      690       +6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Shewale41
Copy link
Author

Hey @DenizAltunkapan @yanglbme @alxkm 👋 can you please review this PR , I have cleared all the checks can you merge my PR.
Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants