"Like if I have 5 tshirts and i want to gift them to my 5 cousins named A,B,C,D,E, so find number of ways in which particular cousin won't get their particular tshirts."
So number of ways:
D(n)=n!*(1-1/1!+1/2!-1/3!+.....(-1)^n*1/n!))
Where n is number of things which don't go to their original position here in this question n = 5
So 5!*(1-1/1!+1/2!-1/3!+1/4!-1/5)) = 44 ways in which 5 tshirts won't go to their original position
D(1) = 0
D(2) = 1
D(3) = 2
D(4) = 9
D(5) = 44
D(6) = 265 (( remember these values of Dearangements )).
" Success is never ending and Failure is never final " so even though you get successed in your life , never feel that your job is completed . Dream big and keep working on it to reach your goal. similarly...
Java 9 is here! A major feature release in the Java Platform Standard Edition is Java 9 Lets see what more it offers more than its previous versions Java platform module JEP 223 : New version...