Unique number i

For this problem , testcase -1 shows run time error .please help me to get the reason for run time error in this problem.

Vikas, plz share the code by saving on ide so that I could check it.