Skip to content

Commit 0c285f9

Browse files
authored
Merge branch 'master' into master
2 parents ff6a618 + a672112 commit 0c285f9

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

README.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,9 +225,19 @@ const words = [
225225

226226
## Iteration #8: Bonus
227227

228-
In the 20×20 grid below; What is the greatest product of four adjacent numbers in the same direction (up, down, left, right)?
228+
What is the greatest product of four adjacent numbers? We consider adjacent any four numbers that are next to each other in horizontal, vertical o diagonal.
229229

230-
Declare a function named `greatestProduct` to find the answer!
230+
For example, if we have a 5x5 Matrix like:
231+
232+
[ 1, 2, 3, 4, 5]
233+
[ 1, 20, 3, 4, 5]
234+
[ 1, 20, 3, 4, 5]
235+
[ 1, 20, 3, 4, 5]
236+
[ 1, 4, 3, 4, 5]
237+
238+
The greatest product will be the 20x20x20x4 = 32,000;
239+
240+
Declare a function named `greatestProduct` to find it in the 20×20 grid below!
231241

232242
```javascript
233243
const matrix = [

0 commit comments

Comments
 (0)