| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | Sorting |
On 11 Jan 96 23:44, Roy McNeill wrote to Kieran Haughey:
Hi Roy,
RM> Hi Kieran
KH>> I was wondering if someone might be able to point me in the right
KH>> direction of how to numerically and alphabetically sort a large
KH>> file, say ranging from 1k to over 4meg in size...
RM>> I'd suggest finding a book on sorting or general algorithms. Simple
RM>> sorting I can explain, but when you introduce the limitation that
RM>> the array to be sorted can't fit into memory in one piece, then the
RM>> best in-memory sorting algorithms can run into funny limitations
RM>> (if, for example, they need to access widely spaced records
RM>> sequentially).
RM> I suppose so, but I wouldn't have the first clue on a book which
KH>> would cover it.. at the moment the best idea I can think of is loading
KH>> as many lines as possible into an array sort that, then load the rest
KH>> until
KH>> you hit the end of the file sorting as you go.. then passing over the file
KH>> numerous times at different line offsets, but I don't think it would work
KH>> in practise to well :(
RM> I'll give you a summarized summary of what my book says, to try to
RM> convince you to go get a book. Sorting is a large subject.
I can imagine it would be a large subject, thanks for the stuff from the
book below.. :), it was basically the same Idea I had for it anyway,
multi-passing in memory..
I have now thought of a way around the need for sorting.. but I might still
try writing a sorting program to speed up the way around :)..
RM> Have I convinced you to go find a book yet?
I'll have a look for one next time I'm at Dymocks :)..
ÿ
Cheers,
Kieran
3:711/413.17{at}fidonet
@EOT:
--- MsgedSQ 3.30
* Origin: -=> The Last Stand Against Sanity <=- (3:711/413.17)SEEN-BY: 50/99 620/243 623/630 711/401 409 410 413 420 423 430 510 808 809 SEEN-BY: 711/932 934 712/515 713/888 714/906 800/1 7877/2809 @PATH: 711/413 808 809 934 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.