Why am i getting run-error in some test cases?
Subarrays with distinct elements
Well you should declare arr[N] once you know N.
Declare it after getting N.
That’s why you are getting runtime error.
I hope i have cleared your doubt. You may close the thread if so 
Please leave a rating 
1 Like
Thanks it helped me getting the right answer
Thats great. You may close the thread now