Too much memory used for N-queens problem

2021-03-27 Thread shirleyquirk
yes it's not the most memory efficient solution. i believe i did one of these using bitsets but i can't find it. at n=15 there are almost 2.3 million solutions so the data structure you use to hold a solution better be small. if you're representing a solution as a seq[int] with length 15 and may

Too much memory used for N-queens problem

2021-03-27 Thread iortega
I'm sorry for making that much posts on my first day after signing up, but I have been testing several other Nim implementations and I thought this would also be interesting. I made a similar post today on I encountered the following program: