Open shreyasrivastava936 opened 4 years ago
Hello, I would like to try this!
The N-Queen problem can be solved using backtracking and bit masking, this is an optimised approach than the normal backtracking approach. In this case, we don’t need to write a function which works in linear time for finding the correct placing of the queen in each case basically the safe place, instead we use bitsets which work in O(1) time. For rows and columns a simple array can be maintained for checking while for the diagonals, the difference between the indices will be taken into consideration for checking a safe place.
@shreyasrivastava936 you have 2 active issues. So, I am assigning it to @RiaJha02.
@raghav-dalmia please review my Pull Request Done with the listed changes :+1:
I would like to contribute to this problem for GSSoC'20.