Skip to content

Commit ed9c952

Browse files
committed
Fixed formatting
1 parent a27b588 commit ed9c952

File tree

1 file changed

+16
-7
lines changed

1 file changed

+16
-7
lines changed

README.md

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,25 @@
11
# Day 5: Recursive Selection Sort
22

3-
**Fork and then clone me!**
3+
## Learning Goals
44

5-
Sort an Array of numbers using selection sort. The selection sort algorithm sorts an array by repeatedly finding the minimum element (lowest value) in the input Array, and then putting it at the correct location in the sorted Array.
5+
- Solve algorithm problems using recursion
66

7-
Once you're done solving the problem, calculate the average run time and compare it to the average run time for the iterative version.
7+
## Instructions
88

9-
```
9+
Sort an array of numbers using selection sort. The selection sort algorithm
10+
sorts an array by repeatedly finding the minimum element (lowest value) in the
11+
input array, and then putting it at the correct location in the sorted array.
12+
13+
Once you're done solving the problem, calculate the average run time and compare
14+
it to the average run time for the iterative version.
15+
16+
```txt
1017
Input: [3, -1, 5, 2]
1118
Output: [-1, 2, 3, 5]
1219
```
1320

14-
You may wish to convert your iterative solution to a recursive one. We've included our old solutions in Ruby and JavaScript below:
21+
You may wish to convert your iterative solution to a recursive one. We've
22+
included our old solutions in Ruby and JavaScript below:
1523

1624
```ruby
1725
def selection_sort(arr)
@@ -44,9 +52,10 @@ function selectionSort(arr) {
4452
}
4553
```
4654

47-
Use the language of your choosing. We've included starter files for some languages where you can pseudocode, explain your solution and code.
55+
Use the language of your choosing. We've included starter files for some
56+
languages where you can pseudocode, explain your solution and code.
4857

49-
## Before you start coding:
58+
## Before you start coding
5059

5160
1. Rewrite the problem in your own words
5261
2. Validate that you understand the problem

0 commit comments

Comments
 (0)