Combination of Numbers

Introduction I already have one post on this blog which explains the permutations code, now its time for the combinations. The idea behind Combination of Numbers Combination by definition is a concept of discrete mathematics which essentially relates to the act of selecting a list of items from a collection. For e.g. If I have to pick up 3 fruits from a basket of 10 fruits then what all ways are there to pick them up? Combinations is the answer to this question. Let us say that I picked an Apple, a Banana and a Strawberry from the basket, then it really won't matter in what order I pi...
Read More

Code to find Permutation of Numbers

Introduction The article is about writing a Code to find permutation of numbers, the program prints all possible permutations of a given list or array of numbers. I have this question listed on my account as well. To know the opinions of other people on the same and to find out other ways to solve the problem, please visit the link Also, you might be interested in the code for Combinations. Find it here Problem Statement Given a list of numbers, print the possible permutations. The program must also be able to print P(n,r) where N and r can be input parameters. Before ...
Read More