python (65.1k questions)
javascript (44.2k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (12.9k questions)
How to optimize N-queen with openmp - C
I am learning OpenMP and found the following code to solve N-Queens problem. I want to make faster solution with parallel code, but I don't know how to do it. Everytime I tried something, it is only g...
Dávid Varga
Votes: 0
Answers: 2
N-Queens 2 leetcode question different output
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 puz...
warlock
Votes: 0
Answers: 0
Traversing the 2D array in the N-Queens problem
I am trying to solve the N-Queens problem using backtracking. The link to the N-Queens problem can be found here, https://leetcode.com/problems/n-queens/ please visit that link for a better understand...
Alex Irabor
Votes: 0
Answers: 1
Trying to solve N Queen by backtracking but returns nothing Java
I referred to someone's backtracking code of N Queen in C and tried to implement it in Java, but I kept getting empty output.
Below is the code I wrote (isValid is for checking the validity of placing...
Tina
Votes: 0
Answers: 0