-
-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Added a bit manipulation program to determine even or odd numbers #2959
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
Conversation
Implementation to Check if a number is Even or Odd using Bitwise Operator
realstealthninja
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are two files under this pr
Deleted the one file as there was 2 files in the commit
|
Deleted the second file in the commit and creating the separate PR for the second file |
|
This pull request has been automatically marked as abandoned because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
|
commenting to keep this active |
realstealthninja
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
even or should return boolean; I have added other suggestions as well. Let me know if you dont understand something. Thank you for raising this pull request ❤️
Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>
Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>
Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>
Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>
modified
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated the file thanks
|
please switch to using boolean instead of string |
reverted to boolean to check if number is even or not
|
reverted to boolean to check if number is even or not |
realstealthninja
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nicely Done! thank you for this pr!
…eAlgorithms#2959) * Create check_even_odd.cpp Implementation to Check if a number is Even or Odd using Bitwise Operator * Update check_even_odd.cpp * Create factorial_top_down_dp.cpp * Delete dynamic_programming/factorial_top_down_dp.cpp Deleted the one file as there was 2 files in the commit * Create factorial_top_down_dp.cpp * Delete dynamic_programming/factorial_top_down_dp.cpp * Update bit_manipulation/check_even_odd.cpp Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com> * Update bit_manipulation/check_even_odd.cpp Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com> * Update bit_manipulation/check_even_odd.cpp Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com> * Update bit_manipulation/check_even_odd.cpp Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com> * Update check_even_odd.cpp modified * Update check_even_odd.cpp reverted to boolean to check if number is even or not --------- Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>
…bers (TheAlgorithms#2959)" This reverts commit bcb09df.
…bers (TheAlgorithms#2959)" This reverts commit bcb09df.
Description of Change
Previously, the repository did not include an implementation for checking whether a number is even or odd using bit manipulation techniques. I have created a new file and added the code to perform this check using bitwise operations.
file location for ref:
bit_manipulation/check_even_odd.cppNotes: Added
check_even_odd.cppa bit manipulation method to check if a number is even or odd.