---
title: "Discussion on \"N-Queens II\" | Hashnode"
description: "Discussion on \"N-Queens II\". The n-queens puzzle is the problem of placing n queens on an n x n chessboard such that no two queens attack each other.\nGiven an integer n, return the number of distinct solutions to the n-queens puzzle.\nExample 1:\n\nInput: n = 4\nOutput: 2\nExplanatio..."
url: "https://hashnode.com/posts/n-queens-ii/667dc61a8629baf34959450d"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [N-Queens II](https://lietcode.hashnode.dev/n-queens-ii?utm_source=hashnode&utm_medium=feed)

The n-queens puzzle is the problem of placing n queens on an n x n chessboard such that no two queens attack each other. Given an integer n, return the number of distinct solutions to the n-queens puzzle. Example 1: Input: n = 4 Output: 2 Explanatio...

Jun 27, 2024 · 3 min read · lietcode.hashnode.dev  
Read the article

-   [#backtracking](https://hashnode.com/tag/backtracking)

## Written by

[Abhi](https://hashnode.com/@lietcode)

@lietcode

  
[View profile](https://hashnode.com/@lietcode)

Let's crack the interviews

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
