Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
📥 Pull Request
Description
Bubble Sort repeatedly swaps adjacent elements if they are in the wrong order. This algorithm is simple but has a time complexity of O(n ^2), making it inefficient for large datasets
Insertion Sort builds the sorted array one item at a time, inserting each element into its correct position. Its time complexity is O(n ^2), but it is efficient for small arrays or nearly sorted data.
Selection Sort repeatedly finds the minimum element and places it at the beginning. It has O(n ^2 ) time complexity, making it inefficient for large arrays but useful for smaller datasets or partially sorted data.
Merge Sort is a divide-and-conquer algorithm that splits the array in half, recursively sorts each half, and merges them. It has a time complexity of O(nlogn) and is efficient for large datasets.
Quick Sort is a divide-and-conquer algorithm that picks a pivot element, partitions the array around it, and sorts the partitions. It has an average time complexity of O(nlogn).
Fixes #1994