I am writing a program which requires me in part to shuffle a list of elements using a predefined function for generating randomness to supply to the shuffler. The random function returns a float between [0,1) to the shuffling function and the shuffler then uses this randomness to decide which elements should go where in the list.
here is a sample list of elements I used to experiment with:
{"objectify", "simplify", "reduce", "reuse", "establish", "rhetoric", "bastion", "smile", "dash", "relocate", "embellishment", "dapple", "dot", "rewiring", "schooner"}
My question is, what is a good method for sorting these considering I may have a much, much larger pool of elements to rearrange?
Aucun commentaire:
Enregistrer un commentaire