Solving the N Queens problem in O(n!) time.