Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: Please help ! k Queens domination nxm chessboard problems.

  1. #1
    Junior Member
    Join Date
    Sep 2012
    Posts
    7
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default Please help ! k Queens domination nxm chessboard problems.

    This is my homework. And I don't want to ask for solution of any kind. I just want some clue, hint, strategy to start.

    Find a placement of k queens on an n x m chessboard such that the queens will dominate each of the n x m cells. And I have to solve this problem using stack.
    P/s : I have solved the n queens problem using stack before, but I have got stuck with this one for 3 days.


  2. #2
    Member
    Join Date
    Jun 2012
    Posts
    41
    Thanks
    0
    Thanked 1 Time in 1 Post

    Default Re: Please help ! k Queens domination nxm chessboard problems.

    Hmm... Well, since you can fit most any program to a stack...try doing it without a stack first. Keep in mind you can probably use more than one stack.

  3. The Following User Says Thank You to lightOfDay For This Useful Post:

    bruce88 (October 22nd, 2012)

Similar Threads

  1. Replies: 5
    Last Post: October 12th, 2012, 02:24 PM
  2. Using a while or do loop to represent the Rice and Chessboard case
    By WhyExist in forum Loops & Control Statements
    Replies: 10
    Last Post: October 12th, 2012, 10:39 AM
  3. A chessboard with loops!
    By Hass in forum What's Wrong With My Code?
    Replies: 1
    Last Post: October 5th, 2011, 04:47 AM
  4. Recursion for N Queens problem
    By dubois.ford in forum Algorithms & Recursion
    Replies: 0
    Last Post: February 23rd, 2011, 09:46 PM
  5. Chessboard filling issue
    By olemagro in forum AWT / Java Swing
    Replies: 7
    Last Post: January 23rd, 2010, 07:07 PM