Picking 'k' items from a list of 'n' - Recursion

Let me preface this post by saying I suck at recursion. But it never stopped me from trying to master it. Here is my latest (successful) attempt at an algorithm that required recursion. Background: You can safely skip this section if you’re not interested in the back story behind why I decided to code this up. I was listening to KhanAcademy videos on probability. I was particularly intrigued by the combinatorics video....

October 17, 2011 · 2 min