Subarrays with distinct elements

https://ide.codingblocks.com/s/318523 all testcases didn’t pass

I have edited your code… try to submit now…