Naive + 1 queen per row restriction (Counting Solutions; Constructing solutions n-Queens Problem)

From Algorithm Wiki
Jump to navigation Jump to search

Time Complexity

$O(n!)$

Space Complexity

$O(n)$ words

(Keep track of current configuration being tested, along with current count)

Description

Approximate?

Exact

Randomized?

No, deterministic

Model of Computation

Word RAM

Year

1850

Reference