Episode #478: Combination

Quick, how do you discover every possible combination of 5 cards drawn from a 7-card set? In this episode you'll see a demonstration of Ruby's shortcuts for this kind of data-shuffling busywork. In the process, you'll learn why Ruby has both Array#combination and Array#repeated_combination methods.

This page is just for members. Sign in or subscribe to gain access!