Lecture
Coding Quiz - Implementing Selection Sort
Based on what you've learned so far, implement the selection sort algorithm yourself.
Write Your Code
def solution(numbers): # Write your code here return
Constraints
-
numbersis a list of numbers. -
The
length of the list must be at least 1.
Input/Output Examples
-
Input:
[29, 10, 14, 37, 13] -
Output:
[10, 13, 14, 29, 37]
-
Input:
[64, 25, 12, 22, 11] -
Output:
[11, 12, 22, 25, 64]
Lessons in this chapter · Mastering Sorting Algorithms
- 1. What is Bubble Sort?
- 2. Understanding Bubble Sort in Detail
- 3. Multiple-choice quiz
- 4. Coding Quiz - Implement Bubble Sort
- 5. What is Selection Sort?
- 6. Understanding Selection Sort
- 7. Multiple-choice quiz
- 8. Coding Quiz - Implementing Selection Sort
- 9. What is Insertion Sort?
- 10. Understanding Insertion Sort in Depth
- 11. Multiple-choice quiz
- 12. Coding Quiz - Implement Insertion Sort
Lecture
AI Tutor
Design
Upload
Notes
Favorites
Help