View Single Post
  #65 (permalink)  
Old 11-20-09, 17:42
Lenny77 Lenny77 is offline
Registered User
 
Join Date: Jul 2009
Location: NY
Posts: 886
Arrow New Version of the Solver

Code:
Source (line, sudoku_str) as 
(
select 1, '800000350'
  from sysibm.sysdummy1
union all
select 2, '000041002'
  from sysibm.sysdummy1
union all
select 3, '000350040'
  from sysibm.sysdummy1
union all 
select 4, '000090718'
  from sysibm.sysdummy1
union all
select 5, '018000920'
  from sysibm.sysdummy1
union all
select 6, '924080000'
  from sysibm.sysdummy1
union all
select 7, '030026000'
  from sysibm.sysdummy1
union all
select 8, '200930000'
  from sysibm.sysdummy1
union all
select 9, '086000003'
  from sysibm.sysdummy1
)
Quote:
Line 1: | 8 | 4 | 2 | 6 | 7 | 9 | 3 | 5 | 1 |
Line 2: | 3 | 9 | 5 | 8 | 4 | 1 | 6 | 7 | 2 |
Line 3: | 1 | 6 | 7 | 3 | 5 | 2 | 8 | 4 | 9 |
Line 4: | 6 | 5 | 3 | 2 | 9 | 4 | 7 | 1 | 8 |
Line 5: | 7 | 1 | 8 | 5 | 6 | 3 | 9 | 2 | 4 |
Line 6: | 9 | 2 | 4 | 1 | 8 | 7 | 5 | 3 | 6 |
Line 7: | 5 | 3 | 9 | 4 | 2 | 6 | 1 | 8 | 7 |
Line 8: | 2 | 7 | 1 | 9 | 3 | 8 | 4 | 6 | 5 |
Line 9: | 4 | 8 | 6 | 7 | 1 | 5 | 2 | 9 | 3 |
Lenny

P.S. New version you can find in attachment
Attached Files
File Type: txt SUDOKU_Solver_Short_v3.txt (24.2 KB, 116 views)
Reply With Quote