Skip to content

Commit f06aca6

Browse files
committed
docs: update comments
1 parent 4fe9bc8 commit f06aca6

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

python-algorithm/algorithm/dp/fibonacci.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def fibonacci_generator(n: int) -> Generator[int, None, None]:
6363
"""
6464
Calculate the Fibonacci number of the given number using generator approach.
6565
:param n: input number
66-
:return: Fibonacci number
66+
:return: generator of Fibonacci numbers
6767
"""
6868
yield 0 # special case
6969
if n > 0:

python-algorithm/algorithm/math/greatest_common_divisor.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
def gcd_euclidean(a: int, b: int) -> int:
22
"""
33
Find the greatest common divisor of two numbers using the Euclidean algorithm.
4-
:param a: number
4+
:param a: dividend
55
:param b: divisor
66
:return: the greatest common divisor
77
"""
@@ -14,7 +14,7 @@ def gcd_euclidean_divmod(a: int, b: int) -> int:
1414
"""
1515
Find the greatest common divisor of two numbers using the Euclidean algorithm.
1616
If the numbers are large, use divmod to calculate them.
17-
:param a: number
17+
:param a: dividend
1818
:param b: divisor
1919
:return: the greatest common divisor
2020
"""
@@ -26,7 +26,7 @@ def gcd_euclidean_divmod(a: int, b: int) -> int:
2626
def gcd_extended_euclidean(a: int, b: int) -> tuple:
2727
"""
2828
Find the greatest common divisor of two numbers using the extended Euclidean algorithm.
29-
:param a: number
29+
:param a: dividend
3030
:param b: divisor
3131
:return: the greatest common divisor, x, y (where ax + by = gcd(a, b))
3232
"""

0 commit comments

Comments
 (0)