What would you like to share?
Description
The docstrings in sorts/bubble_sort.py provide only a very brief description of the Bubble Sort implementations.
Current docstrings:
bubble_sort_iterative(): "Pure implementation of bubble sort algorithm in Python"
bubble_sort_recursive(): "It is similar iterative bubble sort but recursive."
While these identify the implementations, they do not briefly explain how the Bubble Sort algorithm works. Adding a short algorithm summary would make the documentation more informative and beginner-friendly.
Expected Behavior
Expand the docstrings to include a concise explanation of the algorithm, for example that Bubble Sort repeatedly compares adjacent elements and swaps them until the collection is sorted.
Optionally, the docstrings could also mention the algorithm's average/worst-case time complexity and space complexity to improve the documentation.
Additional information
This is a documentation enhancement only. No changes to the algorithm or its behavior are required.
What would you like to share?
Description
The docstrings in
sorts/bubble_sort.pyprovide only a very brief description of the Bubble Sort implementations.Current docstrings:
bubble_sort_iterative(): "Pure implementation of bubble sort algorithm in Python"bubble_sort_recursive(): "It is similar iterative bubble sort but recursive."While these identify the implementations, they do not briefly explain how the Bubble Sort algorithm works. Adding a short algorithm summary would make the documentation more informative and beginner-friendly.
Expected Behavior
Expand the docstrings to include a concise explanation of the algorithm, for example that Bubble Sort repeatedly compares adjacent elements and swaps them until the collection is sorted.
Optionally, the docstrings could also mention the algorithm's average/worst-case time complexity and space complexity to improve the documentation.
Additional information
This is a documentation enhancement only. No changes to the algorithm or its behavior are required.