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: README.md
+12-2Lines changed: 12 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -225,9 +225,19 @@ const words = [
225
225
226
226
## Iteration #8: Bonus
227
227
228
-
In the ×ばつ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.
229
229
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 grid below!
0 commit comments