Giving tle for one test case
hi @alter
due to exponential time complexity it will give tle
try to optimise isSafe function
think about it
hint:
make 3 arrays
to find whether queen is safe or not in O(1)
or you can watch this video
hi @alter
due to exponential time complexity it will give tle
try to optimise isSafe function
think about it
hint:
make 3 arrays
to find whether queen is safe or not in O(1)
or you can watch this video