2 ms·
He left out the most efficient solution. Using bits to store the positions instead of an array then you can check if the queens conflict with a couple bitwise
by pmorici 18y ago
He left out the most efficient solution. Using bits to store the positions instead of an array then you can check if the queens conflict with a couple bitwise &&'s instead of looping.
- threadman 18y agointeresting point - worth a comment in the blog post