Quote Originally Posted by leinad31 View Post
Storage would be another problem... you can squeeze bitmap of 0-90 into 12 bytes (96 bits, 24 hex characters), but you also need to store list info (since numbers in list aren't displayed always in ascending order). That would be another 12 bytes (1 byte per number in list) for a total of 24 bytes (doubled size requirement).

Cost of minimized storage is increased CPU load (bit manipulation/masking, copy memory operations, etc) in order to format as numeric.

As already discussed, array storage is half (array data portion only, 12 bytes, no unique key/flag) but cost is CPU load from iterations.
From what i get, the OP wants to display a list of all sequences of 12 different numbers 1-90, but without using the same exact numbers in a different sequence. i really don't see why the sequence order would be important since there is only one available sequence per group of numbers to be used. He doesn't say the numbers are inputted, as far as i know they could be incremented in the loop. He says sequence matters but he goes on to say that you cannot have the same numbers in a different sequence, that is all he says; nothing about "i need to use the sequence in my program for some other purpose", so i cannot say for sure this isn't what he's looking to do. BUT if the number sequence turns out to be important in whatever it is that he is making, its only 6 more bytes to store instead of the 12 you suggest to hold the info needed to return the numbers to the exact order in which they were presented.(you only need 4 bits to hold 0-11 or 1-12)

anhn has the right idea when it comes to performing this task, which is you don't need to loop to check for duplicate sequences, if you can loop 90^12 times and grab the bits from it(as i do in my example) then you can find every possible non-duplicate sequence that exists in order. Some may argue that vb cannot work with numbers that large but there are ways around the number limitation to get the job done. the only thing stopping you with it is it would still take forever to loop every single sequence, and there is no place large enough for you to store the sequences anywhere.