From f5c894e011201f387b83bc621bc0c5d96b8f3e88 Mon Sep 17 00:00:00 2001 From: Pranav Jain Date: Fri, 30 Jan 2026 23:39:38 +0530 Subject: [PATCH 1/2] Added 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..12a505e46da7 100644 --- a/sorts/bubble_sort.py +++ b/sorts/bubble_sort.py @@ -107,8 +107,12 @@ def bubble_sort_recursive(collection: list[Any]) -> list[Any]: if __name__ == "__main__": + + #doctest is a Python module used for testing your code automatically. import doctest + #sample : It picks unique random items from a list, set, or sequence. from random import sample + #timeit is used to measure how long a piece of code takes to run. from timeit import timeit doctest.testmod() From 20cbbfc2efc9f8348af33a2816b34662d221f677 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 30 Jan 2026 18:11:52 +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 | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/sorts/bubble_sort.py b/sorts/bubble_sort.py index 12a505e46da7..be486871b627 100644 --- a/sorts/bubble_sort.py +++ b/sorts/bubble_sort.py @@ -107,12 +107,13 @@ def bubble_sort_recursive(collection: list[Any]) -> list[Any]: if __name__ == "__main__": - - #doctest is a Python module used for testing your code automatically. + # doctest is a Python module used for testing your code automatically. import doctest - #sample : It picks unique random items from a list, set, or sequence. + + # sample : It picks unique random items from a list, set, or sequence. from random import sample - #timeit is used to measure how long a piece of code takes to run. + + # timeit is used to measure how long a piece of code takes to run. from timeit import timeit doctest.testmod()