You will often see sorting fails when using this rule. The method of computation If you are interested in the methods of N queens or sorting, see the method page . For example, Timothy Budd's or this page . The conventional method takes time proportional to an exponential function of N , and so it needs huge amount of time when N is large. However, this method is superior in that exaustive search of solutions can be easily done.
References See the section of references in the home page to see notes.
The source program of the above applet is here. However, this applet is the worst in the sense of object oriented programming for the sake of shortening its loading time. That means that everything is packed into one class.