Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/algorithms/sort/bubble-sort/bubble-sort.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import { Comparator, ComparatorFunction } from "@/utils";

/**
* Sorts the given array in-place using the bubble sort algorithm.
* Sorts the given array using the bubble sort algorithm.
*
* @param arr - The array to be sorted.
* @param from - The starting index of the array to be sorted (default is 0).
* @param to - The ending index of the array to be sorted (default is the last index).
* @param compareFn - An optional comparison function to use for sorting.
* @returns The sorted array.
*/
export function bubbleSort<Element>(
Expand Down