From fa272a85943d18b8d8b509f9271acd3a9ade699c Mon Sep 17 00:00:00 2001 From: Alexrohith Date: Sun, 11 Jan 2026 17:22:42 +0530 Subject: [PATCH 1/2] Improve documentation and add clarity comments --- sorts/bubble_sort.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sorts/bubble_sort.py b/sorts/bubble_sort.py index 9ec3d5384f38..d6f18bd7c541 100644 --- a/sorts/bubble_sort.py +++ b/sorts/bubble_sort.py @@ -1,4 +1,8 @@ from typing import Any +# Bubble Sort algorithm +# Time Complexity: O(n^2) +# Space Complexity: O(1) + def bubble_sort_iterative(collection: list[Any]) -> list[Any]: From d8d15edf795f7f4e5600924c8e1bc83f0d52daef Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sun, 11 Jan 2026 11:53:26 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- sorts/bubble_sort.py | 1 - 1 file changed, 1 deletion(-) diff --git a/sorts/bubble_sort.py b/sorts/bubble_sort.py index d6f18bd7c541..051dccc4d5dc 100644 --- a/sorts/bubble_sort.py +++ b/sorts/bubble_sort.py @@ -4,7 +4,6 @@ # Space Complexity: O(1) - def bubble_sort_iterative(collection: list[Any]) -> list[Any]: """Pure implementation of bubble sort algorithm in Python