about | help | code help+videos | done | prefs |
Combinations -- Remember from your algebra daze -- A Combination is an UN-ordered Combination (where you remind yourself that order DOES NOT matter.) Sometimes you will see it written 7C5 or in function notation C(7,5). If you have SEVEN (UN-distinguishable) objects and you want to order them in groups of FIVE. The "formula is 7!/(5!*(7-5)!)" ... You can write a helper method to calculate factorial - call it twice and find the quotient ... OR you can recognize 7!/(5!*2!) = (7*6*5*4*3*2*1)/(5*4*3*2*1 * 2*1) = (7*6)/2 = 21 combination(7, 5) → 21 combination(3, 2) → 3 combination(5, 1) → 5 ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 102
Copyright Nick Parlante 2017 - privacy