Podcast
Questions and Answers
What is Selection sort?
What is Selection sort?
- A sorting algorithm that can only sort small data sets
- A complex sorting algorithm
- An in-place comparison-based sorting algorithm (correct)
- A sorting algorithm that requires additional memory
What is the time complexity of Selection sort?
What is the time complexity of Selection sort?
- Ο(nlogn)
- Ο(n2) (correct)
- Ο(1)
- Ο(n)
How does Selection sort work?
How does Selection sort work?
- It selects the largest element from the unsorted part and swaps it with the rightmost element in the sorted part.
- It selects the smallest element from the unsorted part and swaps it with the leftmost element in the sorted part. (correct)
- It scans the entire list and sorts the elements in descending order.
- It divides the list into two parts, the largest part at the left end and the smallest part at the right end.
What is selection sort?
What is selection sort?
What is the time complexity of selection sort?
What is the time complexity of selection sort?
What happens during each iteration of selection sort?
What happens during each iteration of selection sort?
Flashcards are hidden until you start studying