Subarray with distinct Element

getting wrong answer

Hey @RULEREMPIRES
I commented
correct code :