@manisha11 atleast how many elements??? one or two or three or..............
lets solve using atleast one element..
which means we can have only one element appearing exactly twice or atleast two element appearing twice or three elements(which is not possible)
atleast one element appearing twice :
select one element which is appearing twice which can be done in n ways.. and from remaining n-1 select any two elements in n-1C2 ways.
#ways = n*(n-1C2)
atleast two elements appearing exactly twice:
means we will select two elements from n in nC2 ways..
now total number of ways in which this can be done:
n(n-1)(n+1)/ 2 answer.