Skip to content

Commit a672112

Browse files
authored
Update README.md
1 parent 905ce4d commit a672112

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

README.md

+13-3
Original file line numberDiff line numberDiff line change
@@ -231,9 +231,19 @@ const words = [
231231

232232
## Iteration #8: Bonus
233233

234-
In the 20×20 grid below; What is the greatest product of four adjacent numbers in the same direction (up, down, left, right)?
234+
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.
235235

236-
Write a function `greatestProduct` to find the answer!
236+
For example, if we have a 5x5 Matrix like:
237+
238+
[ 1, 2, 3, 4, 5]
239+
[ 1, 20, 3, 4, 5]
240+
[ 1, 20, 3, 4, 5]
241+
[ 1, 20, 3, 4, 5]
242+
[ 1, 4, 3, 4, 5]
243+
244+
The greatest product will be the 20x20x20x4 = 32,000;
245+
246+
Write a function greatestProduct to find it in the 20×20 grid below!
237247

238248
```javascript
239249
const matrix = [
@@ -260,4 +270,4 @@ const matrix = [
260270
];
261271
```
262272

263-
**Happy coding!** :heart:
273+
**Happy coding!** :heart:

0 commit comments

Comments
 (0)