Platinum Partner
java,code puzzler

Excercise Your Coding Muscles

We thought we'd try something different here at JavaLobby. For the next few weeks, every Thursday, we'll publish a code puzzler for you to solve. I'm sure they'll be easy to solve for such a gifted community of readers as we have here, but let's give it a go. Use whatever frameworks/languages you think are appropriate to solve the question.

Note: Even though there really is nothing stopping you from finding a solution to this on the internet, try to keep honest, and come up with your own answer.  It's all about the participation!

The N Queens Puzzle

One of the classic programming challenges. What you need to do is place 8 queens on an 8x8 chess board in a way that no two queens attack each other. For those who don't play chess, this means that no two queens can be on the same row, column or diagonal.  Sounds simple? Go! 

What's the most efficient way to solve this?

{{ tag }}, {{tag}},

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}
{{ parent.authors[0].realName || parent.author}}

{{ parent.authors[0].tagline || parent.tagline }}

{{ parent.views }} ViewsClicks
Tweet

{{parent.nComments}}