quickSort runtime error


Getting a runtime error.


u havent used the header files for rand as well as time function.
Kindly try to submit now

Sorry, still error.Actually befor using shuffle function too it was giving error.


I have made small changes, try to submit it now

It’s working but why did you change a[n] to a[1000000] ??
How does that matter ? because I have taken every datatype as long long int

See sometimes it happens with online compilers that when we try to submit using n, even though it is long long int values, it shows the runtime error, so to prevent that only, I have mentioned the size of array as 1000000

1 Like