Question: Write a java program to find all diagonals of length >= 4 of a 2d array left to right and right to left. (NOT JUST

Write a java program to find all diagonals of length >= 4 of a 2d array left to right and right to left.

(NOT JUST THE MAIN DIAGONALS) Find all possible diagonals in the array

Example Array:

{1,2,4,5,5} {5,3,4,2,2} {3,2,4,4,5} {3,5,2,4,4}

So this array would have [1,3,4,4 and 2,4,4,4] from left to right, then [5,4,2,3 and 5,4,2,3] from right to left

You can either make one method or use two different methods to solve it

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!