Skip to content

Update index_of_rightmost_set_bit.py. Fix grammar mistakes. #9074

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

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions bit_manipulation/index_of_rightmost_set_bit.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
def get_index_of_rightmost_set_bit(number: int) -> int:
"""
Take in a positive integer 'number'.
Returns the zero-based index of first set bit in that 'number' from right.
Returns -1, If no set bit found.
Return the zero-based index of the first set bit in 'number' starting from right.
Return -1 if the set bit is not found.

>>> get_index_of_rightmost_set_bit(0)
-1
Expand Down