Kindly tell an algorithm to sort a data of 500mb while the memory of the system is just 2 mb.
Thanks
vik.singh
0
Newbie Poster
Recommended Answers
Jump to PostThat's not a very specific scenario or details.
You may want to review this as well: http://www.daniweb.com/forums/faq.php?faq=daniweb_policies
Jump to PostYou use a file based merge sort:
Repeat: Read in about half the memory's worth of data and sort it any way you like Write the sorted data to a temporary file Until all data has been read and sorted once Repeat: read and merge-sorted write the …
All 6 Replies
MosaicFuneral
812
Nearly a Posting Virtuoso
griswolf
304
Veteran Poster
-Powerslave-
0
Newbie Poster
-Powerslave-
0
Newbie Poster
-Powerslave-
0
Newbie Poster
Adak
419
Nearly a Posting Virtuoso
-Powerslave-
commented:
Though this will be a zombie post, I'd disagree with you. User-to-system transitions are costly whch means you can create an even more optimized sorting code. Using the system is still right if getting the job done quickly has priority over performance.
+0
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.