I’m totally new to ruby (and don’t have much experience with
programming at all) and need to implement a program (for school) which
shows a solution for the nQueensProblem. It should be able to show the
solutions even if the “chessboard” is bigger than 8x8!
Can anyone give me some ideas how to get this program done quickly?
Can anyone give me some ideas how to get this program done quickly?
What part are you having trouble with? Dive right in and then just
post questions here as you have them. If you back yourself into a
corner, we’ll get you out.
As others have said, use Google or whatever materials your teacher has
provided to get the basic algorithm for solving the problem. Then code
that algorithm in Ruby. If you look at some of the quizzes and
solutions on rubyquiz.com, you will quickly see that even simple
problems can be solved in many different ways in Ruby. It is a very
flexible language, which is why so many of us enjoy it so much.
I’m sorry if you felt like i’m trying to get the code from you! That
wasn’t the thing i was asking for!! I use to do my homework myself. I
just wanted to know which is the best way to start solving the problem
as a person without knowledge in programming.
Well, it won’t help you with your homework, but if you’re looking for
an introduction to Ruby aimed at those with no previous experience, I
wrote this: