Monday, April 23, 2012

Generating all combinations using brute force

if we have a nxm array...for e.g...if n=3 and m=5



then our array will be of size 3x5 then there will be 15 different positions....we have to place m (5) tasks in different combinations....how much such different combinations can we make..?



i repeat....we have 15 positions according to above mentioned problem in the 2d array....we have to place 5 words in it...how many differnt combinations can we make and how?



plz help me to make a generic approach for a c++ program?



thanks in advance..





No comments:

Post a Comment