for the first one it is permutation with repetition because the order matters n = no of digits
When you have *n* things to choose from ... you have *n* choices each time! So when choosing *r* of them, the permutations are: *n × n × ... (r times) = nr* correct me if am wrong -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algoge...@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.