Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > Programming Puzzle

Reply
Thread Tools

Programming Puzzle

 
 
Jatinder
Guest
Posts: n/a
 
      12-05-2004
Hi all,
I m puzzled with a problem where I have to fill a 9x9 matrix in such a
way that one digit from 1 to 9 can be used only once per row/column.
It can be repeated along diagonal. I had tried some algo but in vain.
Please help me by providing the algo or souce code.
 
Reply With Quote
 
 
 
 
osmium
Guest
Posts: n/a
 
      12-05-2004
"Jatinder" writes:

> I m puzzled with a problem where I have to fill a 9x9 matrix in such a
> way that one digit from 1 to 9 can be used only once per row/column.
> It can be repeated along diagonal. I had tried some algo but in vain.
> Please help me by providing the algo or souce code.


How about this: 123456789, 912345678, 891234567, ....

Algorithmic questions such as this properly belong in comp.programming.


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
A bit of fun. A programming puzzle to be done in C. Rick Dearman C Programming 17 01-06-2009 04:19 PM
Programming Puzzle Jatinder C Programming 271 07-19-2004 02:46 AM
A puzzle to puzzle you sk A+ Certification 1 07-17-2004 05:19 PM
Programming Puzzle Jatinder C++ 273 07-17-2004 12:36 AM
Programming Puzzle Jerry Coffin C++ 5 06-30-2004 10:49 AM



Advertisments