Skip to content

I added the code for Check whether a number is divisible by 2^k or not . #2927

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from

Conversation

Tirth9978
Copy link

Added the function isDivisibleBy2PowerK() to check divisibility by 2 ^ k . Optimized using bitwise AND operation for constant time check
--> Worst Case Time Complexity: O(1)
--> Space Complexity: O(1)
--> Included extensive test cases covering:

@Tirth9978 Tirth9978 marked this pull request as draft April 5, 2025 17:33
@Tirth9978 Tirth9978 marked this pull request as ready for review April 12, 2025 11:28
Copy link
Contributor

This pull request has been automatically marked as abandoned because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale Author has not responded to the comments for over 2 weeks label May 22, 2025
Copy link
Contributor

Please ping one of the maintainers once you commit the changes requested or make improvements on the code. If this is not the case and you need some help, feel free to ask for help in our Gitter channel or our Discord server. Thank you for your contributions!

@github-actions github-actions bot closed this May 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale Author has not responded to the comments for over 2 weeks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants