4
Answers

Combinations in javascript

Rakesh Singh

Rakesh Singh

6y
708
1
Write a javascript program to distribute n identical objects among the r persons.
 
Example: n=2 identical objects.
 and r=2 , persons
so output would be like {1,1}{0,2} {2,0} 
 
function distribute(n,r){
 
 
and one more problem I have
 
Write a javascript function to decrypt the letters in alphabet
for Example : input : nrfzh i.e. n : n +3=q, r:r+3=u and so on.
Output: 'quick'
function decrypt(input){
}
 
 Please help.
Thanks in Advance. 
Answers (4)