about | help | code help+videos | done | prefs |
Permutations -- Remember from your algebra daze -- A Permutation is an ordered Combination (where you remind yourself that order matters. Sometimes you will see it written 7P5 or in function notation P(7,5). If you have SEVEN (distinguishable) objects and you want to order them in groups of FIVE. The "formula is 7!/5!" ... You can write a helper method to calculate factorial - call it twice and find the quotient ... OR you can recognize 7!/5! = (7*6*5*4*3*2*1)/(5*4*3*2*1) = 7*6 = 42 permutations(7, 5) → 42 permutations(3, 2) → 3 permutations(5, 1) → 120 ...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: 101
Copyright Nick Parlante 2017 - privacy