Solves N Queens with backtracking