coding-quiz-2
---
id: coding-quiz-2
title: Coding Quiz - Implementing Selection Sort
description: Write a function that sorts a list of numbers in ascending order using the selection sort algorithm.
tags:
- Coding Quiz
- Selection Sort
- Python
sidebar_position: 8
isPublic: false
---
# Coding Quiz - Implementing Selection Sort
Based on what you've learned so far, implement the `selection sort` algorithm yourself.
<br />
```python title="Write Your Code"
def solution(numbers):
# Write your code here
return
Constraints
-
numbers
is 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]
Want to learn more?
Join CodeFriends Plus membership or enroll in a course to start your journey.