Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.

How to make a sudoku solver in Java?

+1 vote
asked Aug 16, 2020 by Jainil Bavishi (140 points)
How to make a sudoku solver in Java?.We have tried checking rows and column and even 3*3 block but in vain. We have actually made 533 lines of code but are not getting output..

1 Answer

+1 vote
answered Aug 17, 2020 by Peter Minarik (84,720 points)

I think the best would be if you could share your

  1. Solution design, where you explain how you intended to solve the problem
    1. what are your inputs?
    2. what are your outputs?
    3. in what format you store your data?
    4. what is mathematical logic to solve the problem?
    5. do you stop at the first possible solution or you want to detect multiple solutions?
    6. how do you present your solution to the user?
  2. Your existing code
    1. Maybe share the whole project for clarity
    2. Explain where you got stuck
    3. Describe any error, if you see (compilation or execution error).

Asking for a solution for such a non-straight-forward problem probably will get you nowhere. It is not likely that someone can write you the whole solution in a short amount of time. Also, this sounds like a homework assignment or that sort, so the point is to learn from it. Getting a ready-to-use solution will defeat the purpose.

For not getting an output, you should start debugging the code and try to trace what it is doing.

Provide more details and people can help you with specifics. ;)

commented Aug 17, 2020 by Jainil Bavishi (140 points)
Its not a homework Question. How can share the whole code?
commented Aug 18, 2020 by Peter Minarik (84,720 points)
In https://www.onlinegdb.com/ you can create a new project (don't forget to select your language on the right).
You can add files to the project (via upload or copy-paste) - left most button (next to RUN) on the top menu. Then save the whole project (SAVE button, top menu).
On the left menu bar, you can go to "My Projects" then select "Share/Embed Project" and copy the share link here, into the forums.
Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and and receive answers from other members of the community.
...