Posts tagged with 'shuffle'


Shuffling along

One of the sets of algorithms that developers tend to learn pretty early on is sorting a set of items. Bubble sort, selection sort, insertion sort, Shellsort, Mergesort, quicksort. Yeah, these days, your fave set of libraries give you all the sorting methods you’d ever use on, say, an array or list (and probably use quicksort internally), so you’d probably never code one from scratch (and, I’d have to say, even I would have trouble doing so without looking it up). But how about shuffling a set of items? […]

READ MORE

Random sample algorithm

Raymond Chen’s post this morning was about one of the most bizarre uses of GUIDs I’ve ever heard about. I’ll quote the relevant bit: […]

READ MORE

JavaScript: shuffling by sorting

I’ll admit this one is really wacky, so sit yourself down and read through this slowly. It’s OK if you need to take a break for a breather and to clear your mind. I had to the first time I came across this little, er, hack. […]

READ MORE