Programming Puzzle

Discussion in 'C Programming' started by Jatinder, Dec 5, 2004.

  1. Jatinder

    Jatinder Guest

    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.
    Jatinder, Dec 5, 2004
    #1
    1. Advertising

  2. Jatinder

    osmium Guest

    "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.
    osmium, Dec 5, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jatinder

    Programming Puzzle

    Jatinder, Jun 26, 2004, in forum: C++
    Replies:
    273
    Views:
    14,647
    Ioannis Vranos
    Jul 17, 2004
  2. Jerry Coffin

    Programming Puzzle

    Jerry Coffin, Jun 29, 2004, in forum: C++
    Replies:
    5
    Views:
    1,397
    Richard Herring
    Jun 30, 2004
  3. Jatinder

    Programming Puzzle

    Jatinder, Jun 26, 2004, in forum: C Programming
    Replies:
    271
    Views:
    3,716
    Keith Thompson
    Jul 19, 2004
  4. Rick Dearman

    A bit of fun. A programming puzzle to be done in C.

    Rick Dearman, Jan 3, 2009, in forum: C Programming
    Replies:
    17
    Views:
    578
  5. Chris Angelico

    Re: Programming puzzle with boolean circuits

    Chris Angelico, Dec 9, 2013, in forum: Python
    Replies:
    1
    Views:
    99
    Johannes Bauer
    Dec 11, 2013
Loading...

Share This Page