I didn't understand the question

Can we take some elements again if they occur in two subarrays with distinct elements.
like in {9,7,1,3,7,8} should we count 1,3 twice as it occurs in 9,7,1,3 and 1,3,7,8??

Nope, not like this.
Think array_index wise.
[i,j] can be taken once.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.