Here’s the code for arranging given numbers in ascending order . But when I submit it in Codechef it gives runtime(SIGSEGV) error?

the problem states that there can be up to 10^6 (1000000) entries.

Your code is only allowing for 20 entries.
The code seems to work for small numbers of numbers.

Suggest just change a[20] to a[1000000]

Leave a Comment