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