Question: In Java I want to read a file structured like this: 6 6 y c o d e j h s e y p k

In Java I want to read a file structured like this:

6 6 y c o d e j h s e y p k l p h b w a l o b w x z w o b a a i p l y y c g

The first two lines represent the rows and the columns respectively. I want to store the grid in a way that I can access the letters. For example, it would save the first two lines as ['y', 'c', 'o', 'd', 'e', 'j'] and ['h', 's', 'e', 'y', 'p', 'k']. Later on I will be going through these rows left to right and right to left and I will go through the colums top to bottom and bottom to top. How would I do this? Please add comments,

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!