You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: 01-week-1--starter-algorithms/00-day-1--reverse-a-string/README.md
+7-4
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,10 @@
1
1
# Day 1: Reverse a String
2
2
3
-
For this task, you'll need to reverse a string. Your method will receive one argument, a string, and be expected to output that string with its letters in reverse order.
3
+
For this task, you'll need to reverse a string. Your method will receive one
4
+
argument, a string, and be expected to output that string with its letters in
5
+
reverse order.
4
6
5
-
```
7
+
```js
6
8
Input:"hi"
7
9
Output:"ih"
8
10
@@ -14,9 +16,10 @@ Output: "ybabtac"
14
16
15
17
Please solve the problem using iteration.
16
18
17
-
Use the language of your choosing. We've included starter files for some languages where you can pseudocode, explain your solution and code.
19
+
Use the language of your choosing. We've included starter files for some
20
+
languages where you can pseudocode, explain your solution and code.
Copy file name to clipboardExpand all lines: 01-week-1--starter-algorithms/02-day-3--fibonacci-series/README.md
+6-2
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,9 @@
1
1
# Day 3: Fibonacci Series
2
2
3
-
Find the nth element in the Fibonacci series. The Fibonacci sequence starts with a 0 followed by a 1. After that, every value is the sum of the two values preceding it. Here are the first seven values as an example: 0, 1, 1, 2, 3, 5, 8.
3
+
Find the nth element in the Fibonacci series. The Fibonacci sequence starts with
4
+
a 0 followed by a 1. After that, every value is the sum of the two values
5
+
preceding it. Here are the first seven values as an example: 0, 1, 1, 2, 3, 5,
6
+
8.
4
7
5
8
```
6
9
Input: 0
@@ -15,7 +18,8 @@ Output: 55
15
18
16
19
Note that we are using zero-indexing for the series.
17
20
18
-
Use the language of your choosing. We've included starter files for some languages where you can pseudocode, explain your solution and code.
21
+
Use the language of your choosing. We've included starter files for some
22
+
languages where you can pseudocode, explain your solution and code.
Copy file name to clipboardExpand all lines: 01-week-1--starter-algorithms/03-day-4--selection-sort/README.md
+10-5
Original file line number
Diff line number
Diff line change
@@ -1,15 +1,19 @@
1
1
# Day 4: Selection Sort
2
2
3
-
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.
3
+
Sort an Array of numbers using selection sort. The selection sort algorithm
4
+
sorts an array by repeatedly finding the minimum element (lowest value) in the
5
+
input Array, and then putting it at the correct location in the sorted Array.
4
6
5
-
```
7
+
```js
6
8
Input: [3, -1, 5, 2]
7
9
Output: [-1, 2, 3, 5]
8
10
```
9
11
10
-
**Benchmarking**
12
+
## Benchmarking
11
13
12
-
For this task, we are also asking you to calculate the average runtime of your solution. In other words, you run it a bunch of times and then divide the total time it took for the solution to run by the number of times it ran.
14
+
For this task, we are also asking you to calculate the average runtime of your
15
+
solution. In other words, you run it a bunch of times and then divide the total
16
+
time it took for the solution to run by the number of times it ran.
13
17
14
18
Here is the pseudocode for creating your own basic benchmarking procedure:
15
19
@@ -25,7 +29,8 @@ average runtime = (current time - start time) / 2000
25
29
26
30
We have provided you with the long input to use for benchmarking.
27
31
28
-
Use the language of your choosing. We've included starter files for some languages where you can pseudocode, explain your solution and code.
32
+
Use the language of your choosing. We've included starter files for some
33
+
languages where you can pseudocode, explain your solution and code.
Copy file name to clipboardExpand all lines: 01-week-1--starter-algorithms/04-day-5--find-shortest-string/README.md
+11-6
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,10 @@
1
1
# Day 5: Find Shortest String
2
2
3
-
Given an Array of strings, return the shortest string. If there is more than one string of that length, return the string that comes first in the list. The Array will have a minimum length of 1.
3
+
Given an Array of strings, return the shortest string. If there is more than one
4
+
string of that length, return the string that comes first in the list. The Array
For this task, we are also asking you to calculate the average runtime of your solution. In other words, you run it a bunch of times and then divide the total time it took for the solution to run by the number of times it ran.
20
+
For this task, we are also asking you to calculate the average runtime of your
21
+
solution. In other words, you run it a bunch of times and then divide the total
22
+
time it took for the solution to run by the number of times it ran.
19
23
20
24
Here is the pseudocode for creating your own basic benchmarking procedure:
21
25
@@ -29,9 +33,10 @@ loop 1000 times:
29
33
average runtime = (current time - start time) / 2000
30
34
```
31
35
32
-
Use the language of your choosing. We've included starter files for some languages where you can pseudocode, explain your solution and code.
36
+
Use the language of your choosing. We've included starter files for some
37
+
languages where you can pseudocode, explain your solution and code.
0 commit comments