Random Sort/Shuffle a List
I'm trying to figure out an efficient method to randomly shuffle a list. Basically an implementation of Fisher/Yates/Knuth algorithm. In order to do this efficiently the best way is to repeatedly swap two elements in a list (or even a map). The built in functions do not seem to allow you directly write to elements in lists. So I end up having to repeatedly create temporary lists. Which is obviously very inefficient and slow.
Can anyone think of a better way to easily swap two elements within the same list.
Any tips or advice much appreciated.
Zoho Desk Resources
-
Desk Community Learning Series
-
-
-
-
-
-
-
-
-
Zoho CRM Plus Resources
Zoho Books Resources
Zoho Subscriptions Resources
Zoho Projects Resources
Zoho Sprints Resources
Zoho Orchestly Resources
Zoho Creator Resources
Zoho WorkDrive Resources
Zoho Campaigns Resources
Zoho CRM Resources
Writer Get Started. Write Away!
Writer is a powerful online word processor, designed for collaborative work.