+ 2

I want to sort 500000 numbers in C I first though about putting them in an array but can't create a such huge array

can you guy's give me some tips on how to do that please

28th Oct 2018, 9:24 AM
Lemovou Ivan
Lemovou Ivan - avatar
3 Answers
+ 2
Have you considered using a linked list? That way you allocate the memory space dynamically, this will work for any size. And it will probably save time getting the numbers in the right order, as you can just insert each number in the right place.
28th Oct 2018, 10:09 AM
ifl
ifl - avatar
+ 2
you can create an array of size and use a loop to add numbers otherwise it will take you weeks too add each individual number
28th Oct 2018, 9:59 AM
D_Stark
D_Stark - avatar
+ 1
the data are in a file i have to manipulate it with File
28th Oct 2018, 3:37 PM
Lemovou Ivan
Lemovou Ivan - avatar