Skip to content

Commit a18fcb7

Browse files
authored
Fix type hint consistency in docstring
Updated List[int] to list[int] in docstring to match Python 3 type hints.
1 parent 6c04620 commit a18fcb7

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

data_structures/arrays/rotate_array.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ def rotate_array(arr: list[int], steps: int) -> list[int]:
33
Rotates a list to the right by steps positions.
44
55
Parameters:
6-
arr (List[int]): The list of integers to rotate.
6+
arr (list[int]): The list of integers to rotate.
77
steps (int): Number of positions to rotate. Can be negative for left rotation.
88
99
Returns:
10-
List[int]: Rotated list.
10+
list[int]: Rotated list.
1111
1212
Examples:
1313
>>> rotate_array([1, 2, 3, 4, 5], 2)

0 commit comments

Comments
 (0)