Skip to content

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
TheAlgorithms:masterfrom
Rahul-18r:master

Conversation

@Rahul-18r

Copy link
Copy Markdown
Contributor
  • I have read CONTRIBUTING.md.
  • This pull request is all my own work -- I have not plagiarized it.
  • All filenames are in PascalCase.
  • All functions and variable names follow Java naming conventions.
  • All new algorithms have a URL in their comments that points to Wikipedia or other similar explanations.
  • All new code is formatted with clang-format -i --style=file path/to/your/file.java

@DenizAltunkapan

Copy link
Copy Markdown
Member

unfortunately this one already exists in src/main/java/com/thealgorithms/bitmanipulation/SingleBitOperations.java . @Rahul-18r

@Rahul-18r

Rahul-18r commented Jun 19, 2025 via email

Copy link
Copy Markdown
Contributor Author

@Rahul-18r

Rahul-18r commented Jun 19, 2025 via email

Copy link
Copy Markdown
Contributor Author

@DenizAltunkapan

Copy link
Copy Markdown
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
Thank you!

@Rahul-18r

Rahul-18r commented Jun 19, 2025 via email

Copy link
Copy Markdown
Contributor Author

@Rahul-18r Rahul-18r closed this by deleting the head repository Jun 19, 2025
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