For this you can use pascal triangle . It will give the permutation value of the the series . 1 1 2 1 1 3 3 1 1 4 6 4 1 1 5 10 10 5 1 1 6 15 20 15 1
This can easily prepreocessed using dynamic method way . a[0][i]=1 1<=i<=n a[i][0]=1 1<=i<=n a[i][j] = a[i-1][j-1]+a[i][j-1] try this out ....!!!! -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.