Skip to content

Commit 15ae460

Browse files
author
deepshekhardas
committed
chore: add type hints to pancake_sort
Add list[Any] type hints to pancake_sort parameter and return value for consistency with the repository's typing standards and to improve IDE/mypy support. Fixes #14737
1 parent f5988cc commit 15ae460

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

sorts/pancake_sort.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,10 @@
88
python pancake_sort.py
99
"""
1010

11+
from typing import Any
1112

12-
def pancake_sort(arr):
13+
14+
def pancake_sort(arr: list[Any]) -> list[Any]:
1315
"""Sort Array with Pancake Sort.
1416
:param arr: Collection containing comparable items
1517
:return: Collection ordered in ascending order of items

0 commit comments

Comments
 (0)