Skip to content

Commit 706e82e

Browse files
Merge pull request #5 from learn-co-curriculum/gracie-patch
fixes linter rules for week 1
2 parents 59cdb50 + ad562d6 commit 706e82e

File tree

7 files changed

+44
-21
lines changed

7 files changed

+44
-21
lines changed

.vscode/settings.json

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"cSpell.words": ["pseudocode", "Pseudocode"]
3+
}

00-welcome/01-algorithmic-problem-solving/README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,8 @@ Don’t optimize your code for time or space complexity (e.g. how long it takes
104104
run or how much memory it’s using) unless you absolutely need to. There are
105105
three major situations that call for optimization:
106106

107-
- The solution is hanging on certain test cases, and therefore cannot pass since it’s taking too long
107+
- The solution is hanging on certain test cases, and therefore cannot pass since
108+
it’s taking too long
108109
- You were asked to do so
109110
- You think it would be fun to try
110111

01-week-1--starter-algorithms/00-day-1--reverse-a-string/README.md

+7-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
# Day 1: Reverse a String
22

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.
46

5-
```
7+
```js
68
Input: "hi"
79
Output: "ih"
810

@@ -14,9 +16,10 @@ Output: "ybabtac"
1416

1517
Please solve the problem using iteration.
1618

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.
1821

19-
## Before you start coding:
22+
## Before you start coding
2023

2124
1. Rewrite the problem in your own words
2225
2. Validate that you understand the problem

01-week-1--starter-algorithms/01-day-2--find-first-duplicate/README.md

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
11
# Day 2: Find First Duplicate
22

3-
Given an Array, find the first duplicate value that occurs. If there are no duplicates, return -1.
3+
Given an Array, find the first duplicate value that occurs. If there are no
4+
duplicates, return -1.
45

5-
```
6+
```js
67
Input: [2, 1, 3, 3, 2]
78
Output: 3
89

910
Input: [1, 2, 3, 4]
1011
Output: -1
1112
```
1213

13-
Use the language of your choosing. We've included starter files for some languages where you can pseudocode, explain your solution and code.
14+
Use the language of your choosing. We've included starter files for some
15+
languages where you can pseudocode, explain your solution and code.
1416

1517
## Before you start coding:
1618

01-week-1--starter-algorithms/02-day-3--fibonacci-series/README.md

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# Day 3: Fibonacci Series
22

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.
47

58
```
69
Input: 0
@@ -15,7 +18,8 @@ Output: 55
1518

1619
Note that we are using zero-indexing for the series.
1720

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.
1923

2024
## Before you start coding:
2125

01-week-1--starter-algorithms/03-day-4--selection-sort/README.md

+10-5
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
11
# Day 4: Selection Sort
22

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.
46

5-
```
7+
```js
68
Input: [3, -1, 5, 2]
79
Output: [-1, 2, 3, 5]
810
```
911

10-
**Benchmarking**
12+
## Benchmarking
1113

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.
1317

1418
Here is the pseudocode for creating your own basic benchmarking procedure:
1519

@@ -25,7 +29,8 @@ average runtime = (current time - start time) / 2000
2529

2630
We have provided you with the long input to use for benchmarking.
2731

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.
2934

3035
## Before you start coding:
3136

01-week-1--starter-algorithms/04-day-5--find-shortest-string/README.md

+11-6
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
# Day 5: Find Shortest String
22

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
5+
will have a minimum length of 1.
46

5-
```
7+
```js
68
Input: ['aaa', 'a', 'bb', 'ccc']
79
Output: 'a'
810

@@ -13,9 +15,11 @@ Input: ['flower', 'juniper', 'lily', 'dandelion']
1315
Output: 'lily'
1416
```
1517

16-
**Benchmarking**
18+
## Benchmarking
1719

18-
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.
1923

2024
Here is the pseudocode for creating your own basic benchmarking procedure:
2125

@@ -29,9 +33,10 @@ loop 1000 times:
2933
average runtime = (current time - start time) / 2000
3034
```
3135

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.
3338

34-
## Before you start coding:
39+
## Before you start coding
3540

3641
1. Rewrite the problem in your own words
3742
2. Validate that you understand the problem

0 commit comments

Comments
 (0)