Added ToggleKthBit algorithm in bitmanipulation with unit tests. The method toggles the K-th bit of a number using bitwise XOR. Includes an example and JavaDoc.#6299
Closed
Rahul-18r wants to merge 3 commits into
Conversation
Member
|
unfortunately this one already exists in src/main/java/com/thealgorithms/bitmanipulation/SingleBitOperations.java . @Rahul-18r |
Contributor
Author
|
Thanks for the review! I didn’t realize it already existed in
`SingleBitOperations.java`. Closing this PR.
…On Thu, 19 Jun, 2025, 1:16 pm Deniz Altunkapan, ***@***.***> wrote:
*DenizAltunkapan* left a comment (TheAlgorithms/Java#6299)
<#6299 (comment)>
unfortunately this one already exists in
src/main/java/com/thealgorithms/bitmanipulation/SingleBitOperations.java
<https://github.com/TheAlgorithms/Java/blob/master/src/main/java/com/thealgorithms/bitmanipulation/SingleBitOperations.java>
. @Rahul-18r <https://github.com/Rahul-18r>
—
Reply to this email directly, view it on GitHub
<#6299 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BAGYCILBIKZ7PYYZ6IF7PE33EJTHBAVCNFSM6AAAAAB7U2KQD6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDSOBXGA4DKNJVHA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Contributor
Author
|
Hi @DenizAltunkapan,
I’d like to contribute by creating a README.md file in each folder (e.g.,
bitmanipulation) that lists the Java files inside it along with a brief
description of what each file/algorithm does.
This could help new contributors and readers quickly understand the purpose
of each implementation in the folder without needing to open every file.
Would this type of contribution be acceptable?
Thanks!
Rahul
…On Thu, 19 Jun, 2025, 1:16 pm Deniz Altunkapan, ***@***.***> wrote:
*DenizAltunkapan* left a comment (TheAlgorithms/Java#6299)
<#6299 (comment)>
unfortunately this one already exists in
src/main/java/com/thealgorithms/bitmanipulation/SingleBitOperations.java
<https://github.com/TheAlgorithms/Java/blob/master/src/main/java/com/thealgorithms/bitmanipulation/SingleBitOperations.java>
. @Rahul-18r <https://github.com/Rahul-18r>
—
Reply to this email directly, view it on GitHub
<#6299 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BAGYCILBIKZ7PYYZ6IF7PE33EJTHBAVCNFSM6AAAAAB7U2KQD6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDSOBXGA4DKNJVHA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Member
|
Hi @Rahul-18r , Thanks for your interest and your thoughtful suggestion! I think, this is not currently the priority. However, I think it could potentially be automated. I will do some reasearch on that. But if you want to contribute, here is a Task for you: #6300 |
Contributor
Author
|
Hi @DenizAltunkapan,
Thanks for the response!
I'll work on issue #6300 and update the DIRECTORY.md file as suggested.
Will share a PR soon.
Thank You!
Rahul
…________________________________
From: Deniz Altunkapan ***@***.***>
Sent: 19 June 2025 14:37
To: TheAlgorithms/Java ***@***.***>
Cc: Rahul ***@***.***>; Mention ***@***.***>
Subject: Re: [TheAlgorithms/Java] Added ToggleKthBit algorithm in bitmanipulation with unit tests. The method toggles the K-th bit of a number using bitwise XOR. Includes an example and JavaDoc. (PR #6299)
[https://avatars.githubusercontent.com/u/93663085?s=20&v=4]DenizAltunkapan left a comment (TheAlgorithms/Java#6299)<#6299 (comment)>
Hi @Rahul-18r<https://github.com/Rahul-18r> ,
Thanks for your interest and your thoughtful suggestion! I think, this is not currently the priority. However, I think it could potentially be automated. I will do some reasearch on that.
But if you want to contribute, here is a Task for you: #6300<#6300>
Thank you!
—
Reply to this email directly, view it on GitHub<#6299 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/BAGYCINAPS3Z7II3CJOKFC33EJ4T5AVCNFSM6AAAAAB7U2KQD6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDSOBXGMZTAMRWGY>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
clang-format -i --style=file path/to/your/file.java