Skip to content
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

[FEATURE REQUEST] Add New Bit Manipulation Algorithms #5628

Open
sanvviratthore opened this issue Oct 7, 2024 · 4 comments
Open

[FEATURE REQUEST] Add New Bit Manipulation Algorithms #5628

sanvviratthore opened this issue Oct 7, 2024 · 4 comments

Comments

@sanvviratthore
Copy link

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.

@Aastha-ojha-20
Copy link

please assign this to me

@DarkMatter-999
Copy link
Contributor

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?

@jiwansh
Copy link

jiwansh commented Oct 11, 2024

Can you please assign it to me?

@07-Atharv
Copy link

Can you assign this issue to me?

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

No branches or pull requests

5 participants