[ Back to the overview Matrix ]

Test case : 8 Queens Problem

Write an application that calculates and shows a possible solution for placing 8 chess queens on a chessboard in a way that no queen threatens another.

A chessboard has 8x8 squares, and a chess queen threatens every other piece that sits in a square in a straigth line north, northeast, east, southeast,south, southwest, west or northwest of her.

What is tested: graph searching, path finding, backtracking, non-trivial algorithms.

Contributed by Nils M Holm , nmh at despammed.com