Java icon indicating copy to clipboard operation
Java copied to clipboard

[FEATURE REQUEST] Add New Bit Manipulation Algorithms

Open sanvviratthore opened this issue 1 year ago • 4 comments

What would you like to Propose?

I would like to contribute additional bit manipulation algorithms to the repository. Below are some algorithms I plan to implement:

  1. Find the Number Appearing Odd Times
  2. Swap Adjacent Bits of a Number
  3. Bitwise XOR of All Elements in an Array

Issue details

Algorithm 1: Find the Number Appearing Odd Times In an array where all numbers appear even times except one, we find the number that appears an odd number of times using bit manipulation (XOR).

Algorithm 2: Swap Adjacent Bits of a Number Swap every pair of adjacent bits of a given number.

Algorithm 3: Bitwise XOR of All Elements in an Array Compute the XOR of all elements in an array.

Additional Information

I will ensure the implementation follows the existing coding standards and will include unit tests for each algorithm.

sanvviratthore avatar Oct 07 '24 12:10 sanvviratthore

please assign this to me

Aastha-ojha-20 avatar Oct 07 '24 12:10 Aastha-ojha-20

Hey @sanvviratthore , I think the algorithms 1 and 3 are the same / can be solved using same code. Can you explain each of the algorithm further if there is a difference?

DarkMatter-999 avatar Oct 08 '24 06:10 DarkMatter-999

Can you please assign it to me?

jiwansh avatar Oct 11 '24 11:10 jiwansh

Can you assign this issue to me?

07-Atharv avatar Oct 13 '24 15:10 07-Atharv

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contribution!

github-actions[bot] avatar Nov 13 '24 00:11 github-actions[bot]

Hey, @sanvviratthore

I’d like to propose adding more algorithms, such as:

Count Set Bits in an Integer: Efficiently count the 1s in a binary representation. Reverse Bits of a Number: Reverse the order of bits in a binary number. Looking forward to contributing and discussing further! 😊

MQ-06 avatar Nov 20 '24 11:11 MQ-06

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contribution!

github-actions[bot] avatar Dec 22 '24 00:12 github-actions[bot]

Please reopen this issue once you have made the required changes. If you need help, feel free to ask in our Discord server or ping one of the maintainers here. Thank you for your contribution!

github-actions[bot] avatar Dec 29 '24 00:12 github-actions[bot]