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 maybe capacity twice that, i dont know, that's over 500MB right there.
i'm seeing 9685 MB peak memory though, so clearly some room for improvement, see what you can do!
