NeetCode #519LC-52HardBacktrackingNC 250
← Back to All Problems

#519 · #52 · N-Queens II(N 皇后 II)

📌 Problem Statement & Constraints

The n-queens puzzle places n queens on an n x n board so that no two attack each other. Given n, return the number of distinct solutions. Constraints: 1 <= n <= 9.
🔒

Sign In to Unlock Full Solutions for All 973 Problems

Sign in to access step-by-step logic, benchmark Python3 code, complexity breakdown, and offline export!