Binary Decision Diagram for solving the N-Queens problem