in reply to Re: Algorithm help needed.
in thread Algorithm help needed.

This is also called a shuffle, and super-searching for that (or reading Knuth) will give you some very efficient algorithms for doing it.