I'm not sure I understand the challenge text...
Find the greatest product of four numbers in any direction
Does this mean "four consecutive numbers in the same direction" as well?
So a row with
4 2 1 4 5
is it "2 1 4 5" or "4 2 4 5"?
And is only within the same direction or do we test products following a path like:
o X o o X
o o X X o
(being X selected numbers for a product calculation).
And about diagonals, any diagonal or only the 4 main ones?
ie,
o X o o o
o o X o o
o o o X o
o o o o X
o o o o o