+ 1

Solver soduku

How can i determined the numbers of row in a given grid from a text file ... i was able to solve the soduku for only 9×9 i need help only on how can i determine the grid n×n... if its 25×25 or 9×9

2nd Sep 2020, 12:07 PM
Mr database
Mr database - avatar
7 ответов
+ 2
Just traverse the entire board to get an idea of it's dimensions. Or Ask user to provide it along with the board.
2nd Sep 2020, 12:12 PM
Arsenic
Arsenic - avatar
+ 2
MrRobot everytime a new row would start you should encounter a newline character in the text file before. I think this can be achieved with a simple while loop. Also if empty squares are represented by a uniques number (eg 0) then you can just count all the integers and squareroot the answer to get the number of rows.
2nd Sep 2020, 1:06 PM
Arsenic
Arsenic - avatar
+ 1
Like im given a soduku grid to solve ... so i need to determine n×n first... i did 9×9 for checking my solution ..it works ... so now i need to find the n×n to solve others forms how can i do.. plz help
2nd Sep 2020, 12:11 PM
Mr database
Mr database - avatar
+ 1
How can i traverse.. i got an idea but could plz lighten it up pn how to traverse throughout my list
2nd Sep 2020, 12:15 PM
Mr database
Mr database - avatar
+ 1
Thanx that makes sense ...thanks
2nd Sep 2020, 2:11 PM
Mr database
Mr database - avatar
+ 1
Ill do it now
2nd Sep 2020, 2:11 PM
Mr database
Mr database - avatar
0
The user cant provide the size... ill be given the grid randomly so i need to find the n of rows .. plz help me ivr couple of thing but didn t work..
2nd Sep 2020, 12:14 PM
Mr database
Mr database - avatar