Introduction - If you have any usage issues, please Google them yourself
First, procedures for the functional role of the realization of permutation and combination. For example: if allowed the figures for 1 2 3 4, each portfolio has three elements, then the composition of output (1 2 3) (1 2 4) (1 3 4) (2 3 4) Second, algorithms to achieve the idea of using the stack, the first importation of the first combination (1 2 3 ... .. r) if r <n, then r shells stack, and r = r+ 1 push, if r = n, then r shells stack, at the same time before a bomb also stack, and then followed by an increase until the emergence of combination (n-r+ 1 n-r+ 2 .... n).