2nd test case is showing run error
Hey Kunj, mention the problem’s name also for which you have written this code.
Name of the problem-Unique no 2
Hey Kunj, your code is correct but you haven’t checked the constraints mentioned in the problem carefully, it is given that n < 10^5, but you haven taken the array of size 100 only. To resolve this increase the size of array it will work.
i have taken it 1000
but still does not work
please help me out in correcting my code
Hey, your are not getting it, its already mentioned that n can be of range 10^5 so it how will work if you are taking n only 10^3.
Think this as you can’t store 10^5 elements in an array whose size is 10^3, it will definitely throw an error.