Tag Info

New answers tagged


If you're only worried about spreading the similar rows apart, and not as bothered by making sure they are in regular intervals, you can use something like the following: It determines a weight for each group of letters, then uses the ROW_NUMBER function to calculate a distribution of sorts. By tweaking the weighting and/or sorting in the final select, you ...


First, make sure there is a solution according to your requirements (that means, there is not a single letter which occurs more that n/2 times, when n is the total number of elements). Then I suggest you try the following start with a random shuffle or weighted shuffle afterwards, for each remaining pair of similar neighbours, pick one of the items, pick ...

Top 50 recent answers are included