The time complexity of the solution is O(N!), where N is the number of queens. This is because in the worst case, we need to try all possible configurations of the board.