Regarding complexity of the solution

the hint for the question subarray with distinct elements gives a solution with complexity o(n^2). Then, how can it run for value of n<=10^5?

@f20180123 hey,hint wala solution accept ho jayega ,cases ki limit km hogi.