Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.

OP
Lv 5

Help with Java : creating a sudoku?

Hi.

I am currently working on a Sudoku using Java, and I'd like to write a function that returns a boolean and would check whether a grid is filled or not.

However, this is my first time with Java, and I am not sure how to proceed.

Help please!

1 Answer

Relevance
  • 10 years ago
    Favorite Answer

    That would depend on how you are storing the grid.

    Personally, I would consider a grid filled if all 9 locations contain a value between 1 and 9 and would store it in a 2 dimensional array.

    Since there are only 9 grids, 9 rows and 9 columns you could if you wanted to skip some of the logic and code in each grid manually instead of using a loop.

    What have you done so far?

Still have questions? Get your answers by asking now.