From 273eff93e85a4deb002f05bc35966538dc9851a6 Mon Sep 17 00:00:00 2001 From: Tongcai618 <134289249+Tongcai618@users.noreply.github.com> Date: Wed, 20 Sep 2023 23:03:47 -0400 Subject: [PATCH 1/3] Update index_of_rightmost_set_bit.py --- bit_manipulation/index_of_rightmost_set_bit.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bit_manipulation/index_of_rightmost_set_bit.py b/bit_manipulation/index_of_rightmost_set_bit.py index c9c911660b08..8e50ad2459e4 100644 --- a/bit_manipulation/index_of_rightmost_set_bit.py +++ b/bit_manipulation/index_of_rightmost_set_bit.py @@ -4,8 +4,9 @@ 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 this 'number' + starting from right. + Return -1, if the set bit is not found. >>> get_index_of_rightmost_set_bit(0) -1 From bbfaa075d262aa03ededa5179172debb0e304d6b Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 21 Sep 2023 03:08:10 +0000 Subject: [PATCH 2/3] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- bit_manipulation/index_of_rightmost_set_bit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bit_manipulation/index_of_rightmost_set_bit.py b/bit_manipulation/index_of_rightmost_set_bit.py index 8e50ad2459e4..ed619f04c5fa 100644 --- a/bit_manipulation/index_of_rightmost_set_bit.py +++ b/bit_manipulation/index_of_rightmost_set_bit.py @@ -4,7 +4,7 @@ def get_index_of_rightmost_set_bit(number: int) -> int: """ Take in a positive integer 'number'. - Return the zero-based index of the first set bit in this 'number' + Return the zero-based index of the first set bit in this 'number' starting from right. Return -1, if the set bit is not found. From 1868dcee82343319f7365ac8723eb1ca848ebd46 Mon Sep 17 00:00:00 2001 From: Tong Cai <134289249+Tongcai618@users.noreply.github.com> Date: Tue, 26 Sep 2023 13:30:22 -0400 Subject: [PATCH 3/3] Update bit_manipulation/index_of_rightmost_set_bit.py Co-authored-by: Tianyi Zheng --- bit_manipulation/index_of_rightmost_set_bit.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/bit_manipulation/index_of_rightmost_set_bit.py b/bit_manipulation/index_of_rightmost_set_bit.py index ed619f04c5fa..80811a9372f2 100644 --- a/bit_manipulation/index_of_rightmost_set_bit.py +++ b/bit_manipulation/index_of_rightmost_set_bit.py @@ -4,9 +4,8 @@ def get_index_of_rightmost_set_bit(number: int) -> int: """ Take in a positive integer 'number'. - Return the zero-based index of the first set bit in this 'number' - starting from right. - Return -1, if the set bit is not 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