Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. N-Queen Puzzle

N-Queen Puzzle

Scheduled Pinned Locked Moved C / C++ / MFC
c++
10 Posts 9 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • F Offline
    F Offline
    fastian1834
    wrote on last edited by
    #1

    Is there any one who can give me the source code(c++) of the solution of famous N-Queen Puzzle. The Puzzle is as follows. "Suppose we have n “Queens” and an nxn board. Your task is to place those queens in such a way that no Queen is attacked by the other." Please Please reply I need it urgently. Thanx

    Ashfaq

    M A D 3 Replies Last reply
    0
    • F fastian1834

      Is there any one who can give me the source code(c++) of the solution of famous N-Queen Puzzle. The Puzzle is as follows. "Suppose we have n “Queens” and an nxn board. Your task is to place those queens in such a way that no Queen is attacked by the other." Please Please reply I need it urgently. Thanx

      Ashfaq

      M Offline
      M Offline
      Michael Dunn
      wrote on last edited by
      #2

      http://en.wikipedia.org/wiki/Queens_problem[^] has a description of the algorithm to find solutions.

      --Mike-- Visual C++ MVP :cool: LINKS~! Ericahist | PimpFish | CP SearchBar v3.0 | C++ Forum FAQ

      F 1 Reply Last reply
      0
      • M Michael Dunn

        http://en.wikipedia.org/wiki/Queens_problem[^] has a description of the algorithm to find solutions.

        --Mike-- Visual C++ MVP :cool: LINKS~! Ericahist | PimpFish | CP SearchBar v3.0 | C++ Forum FAQ

        F Offline
        F Offline
        fastian1834
        wrote on last edited by
        #3

        Thanx. But i dont have enough time to code it perfectly that's why i am asking one who has coded this puzzle before to give me the source code.

        Ashfaq

        T R M V 4 Replies Last reply
        0
        • F fastian1834

          Thanx. But i dont have enough time to code it perfectly that's why i am asking one who has coded this puzzle before to give me the source code.

          Ashfaq

          T Offline
          T Offline
          toxcct
          wrote on last edited by
          #4

          fastian1834 wrote:

          But i dont have enough time to code it perfectly

          then, go there : http://www.rentacoder.com[^]


          Don't know where to start ?
          Refer the Forums Guidelines and ask a friend

          [VisualCalc 3.0][Flags Beginner's Guide]

          1 Reply Last reply
          0
          • F fastian1834

            Thanx. But i dont have enough time to code it perfectly that's why i am asking one who has coded this puzzle before to give me the source code.

            Ashfaq

            R Offline
            R Offline
            Rajesh R Subramanian
            wrote on last edited by
            #5

            :zzz:

            Nobody can give you wiser advice than yourself. - Cicero

            1 Reply Last reply
            0
            • F fastian1834

              Thanx. But i dont have enough time to code it perfectly that's why i am asking one who has coded this puzzle before to give me the source code.

              Ashfaq

              M Offline
              M Offline
              Matthew Bache
              wrote on last edited by
              #6

              I remember having to do this in the Algorithms course of my MSc too.

              Matt

              if ( ! pMatt->isEnjoying("Sales") )
              {
              pMatt->retrain("Computer Science");
              pMatt->getNewJob("Developer");
              }

              1 Reply Last reply
              0
              • F fastian1834

                Is there any one who can give me the source code(c++) of the solution of famous N-Queen Puzzle. The Puzzle is as follows. "Suppose we have n “Queens” and an nxn board. Your task is to place those queens in such a way that no Queen is attacked by the other." Please Please reply I need it urgently. Thanx

                Ashfaq

                A Offline
                A Offline
                Aqueel
                wrote on last edited by
                #7

                Do your homework yourself buddy... :->

                We Believe in Excellence www.aqueelmirza.cjb.net

                H 1 Reply Last reply
                0
                • F fastian1834

                  Thanx. But i dont have enough time to code it perfectly that's why i am asking one who has coded this puzzle before to give me the source code.

                  Ashfaq

                  V Offline
                  V Offline
                  vijay_aroli
                  wrote on last edited by
                  #8

                  fastian1834 wrote:

                  i dont have enough time to code it perfectly that's why i am asking one who has coded this puzzle before to give me the source code.

                  hello dude!!! well, the algorithm is clearly given there in Wikipedia. and i think it will not take much time for its implementation. don't mind, but if u are expecting someone here to give source code to u, then u are expecting a little too much. you can have someone showing u the right way here but no one has the time to write the code for u. :) Good luck...

                  vijay.

                  1 Reply Last reply
                  0
                  • F fastian1834

                    Is there any one who can give me the source code(c++) of the solution of famous N-Queen Puzzle. The Puzzle is as follows. "Suppose we have n “Queens” and an nxn board. Your task is to place those queens in such a way that no Queen is attacked by the other." Please Please reply I need it urgently. Thanx

                    Ashfaq

                    D Offline
                    D Offline
                    David Crow
                    wrote on last edited by
                    #9

                    See here.


                    "Approved Workmen Are Not Ashamed" - 2 Timothy 2:15

                    "Judge not by the eye but by the heart." - Native American Proverb

                    1 Reply Last reply
                    0
                    • A Aqueel

                      Do your homework yourself buddy... :->

                      We Believe in Excellence www.aqueelmirza.cjb.net

                      H Offline
                      H Offline
                      Hamid Taebi
                      wrote on last edited by
                      #10

                      :)


                      WhiteSky


                      1 Reply Last reply
                      0
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • World
                      • Users
                      • Groups