This repository contains two Java programs that implement sorting algorithms: Selection Sort and Quick Sort. These programs allow users to input an array of integers, which is then sorted using the respective algorithm.
- Algorithm: Iterates through the array, selecting the smallest unsorted element and swapping it with the current element. The process repeats for all elements.
- Time Complexity: O(n²) — less efficient on large lists.
- Algorithm: A divide-and-conquer sorting method. It selects a pivot, partitions the array into elements less than and greater than the pivot, and recursively sorts the partitions.
- Time Complexity: O(n log n) on average — generally more efficient than Selection Sort.