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

added set_kth_bit.cpp #1863

Merged
merged 6 commits into from
Jan 16, 2022
Merged

Conversation

aman2000raj
Copy link
Contributor

@aman2000raj aman2000raj commented Jan 1, 2022

Description of Change

Given a number N and a value K. From the right, set the Kth bit in the binary representation of N. The position of Least Significant Bit(or last bit) is 0, the second last bit is 1 and so on.

Checklist

  • Added description of change
  • Added file name matches File name guidelines
  • Added tests and example, test must pass
  • Added documentation so that the program is self-explanatory and educational - Doxygen guidelines
  • Relevant documentation/comments is changed or added
  • PR title follows semantic commit guidelines
  • Search previous suggestions before making a new one, as yours may be a duplicate.
  • I acknowledge that all my contributions will be made under the project's license.

Notes: Added an algorithm which set kth bit of a given number.

Qannaf
Qannaf previously approved these changes Jan 1, 2022
@aman2000raj
Copy link
Contributor Author

@Panquesito7 please review my PR.

@Panquesito7 Panquesito7 added the enhancement New feature or request label Jan 4, 2022
bit_manipulation/set_kth_bit.cpp Outdated Show resolved Hide resolved
@Panquesito7 Panquesito7 added the requested changes changes have been requested label Jan 4, 2022
Copy link
Member

@Panquesito7 Panquesito7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's just to address this, and you're done! 🎉

bit_manipulation/set_kth_bit.cpp Outdated Show resolved Hide resolved
@Panquesito7 Panquesito7 added approved Approved; waiting for merge and removed requested changes changes have been requested labels Jan 16, 2022
Copy link
Member

@Panquesito7 Panquesito7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome work! You've done amazing work, and it's been your
first contribution here! We hope you keep contributing! 😄👍🎉

After this PR is merged, you can ask for the
contributor role in our Discord server! 🚀

@mishraabhinn mishraabhinn merged commit 53a6c16 into TheAlgorithms:master Jan 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Approved; waiting for merge enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants