Sorting Algorithms Basics
The 'Sorting Algorithms Basics' test covers key questions on the operation and efficiency of various sorting methods, such as Bubble Sort, Merge Sort, and Quick Sort. It also addresses aspects of time and space complexity and their impacts in practical application scenarios.
Sample Questions
Which sorting algorithm repeatedly steps through the list, compares adjacent elements and swaps them if they are in the wrong order?
- Bubble Sort
- Insertion Sort
- Quick Sort
- Merge Sort
What is the time complexity of Bubble Sort in the worst case?
- O(log n)
- O(n²)
- O(n log n)
- O(n)
Which sorting algorithm works by dividing the array into two parts and recursively sorting them?
- Insertion Sort
- Bubble Sort
- Merge Sort
- Selection Sort