Sorting in linear tiime

why is it giving run error

Hello @sktg99,

How are you so sure that there would not be more than 100 elements in the array?
Your code is failing for the test cases containing more than 100 elements.
Solution:
long long int n;
cin >> n;
long long int a[n];

Hope, this would help.
Give a like, if you are satisfied.

1 Like

thanksssssssssssssss :slight_smile:

Anytime.:wink:

BTW, please mark this doubt as resolved.

can u pls check my other pending doubts, nobody is responding

Sure.
But mark this as resolved.