Subarrays with distinct array element

codeLink:https://ide.codingblocks.com/s/186621
I have coded this after watching hint video which yielded into a lot of errors please specify my error and correct it

@Divya_321 hey divya there is so many silly misktake in your code refer to this
https://ide.codingblocks.com/s/186701

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.

@jaiskid please write some comments to your code