Skip to main content
Loading page content
Explore
Learnings
Mental Math
Dashboard
More
Algo
Flow
Visualizers
Learnings
Quizzes
Mental Math
Dashboard
Log in
Sign up
Loading quiz challenge
Back to Visualizer
Question 1 of 5
Classic Problems
• N-Queens Problem
In the N-Queens problem, how do you verify if two queens at positions (r1, c1) and (r2, c2) threaten each other along diagonals?
A
r1 + c1 == r2 + c2
B
|r1 - r2| == |c1 - c2|
C
r1 * c1 == r2 * c2
D
r1 - c1 == r2 - c2