Archives for Friday, March 6, 2015

March 2015 (4)
SMTWTFS
« Feb Apr »
1234567
891011121314
15161718192021
22232425262728
293031

Like this Archive Calendar widget? Download it here.


Generating permutations with Heap’s algorithm

This evening I wanted to solve a particular problem, and it required me – or so I thought – to permute an array of items. Back in the day I wrote an article for PCPlus on the subject and mentioned in there Heap’s algorithm. I hasten to add here that “Heap” here is not the traditional computer science heap, or even the application memory heap, but B.R. Heap, who first formulated and published this algorithm in 1963 (pdf). […]

READ MORE