| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | Sorting |
On 05 Jan 96 22:18, 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
KH>> of how to numerically and alphabetically sort a large file, say ranging
KH>> from
KH>> 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).
I suppose so, but I wouldn't have the first clue on a book
which would cover it.. at the moment the best idea I can think of is
loading asmany lines as possible into an array sort that, then load the
rest untill you hit the end of the file sorting as you go.. then passing
over the file numerous times at different line offsets, but I don't think
it would work in practise to well :(
KH>> It doesn't have to be portable, but it would be preferred.. FWIW i'm using
KH>> Turbo C++ 3.0
RM> Portability is important if you want the fastest possible sort. A
RM> sort optimised for TC++3 on your msdos pc would run like a dog
RM> compared with Quicksort on an OS/2 pc with 32M memory...
true.. and at the moment I am now looking for portability :)..
RM> The book I use is "Algorithms", Robert Sedgewick, Addison-Wesley,
RM> ISBN 0-201-51059-6, but it's not the only book (I only got one
RM> book, I'm a rank amateur.) Look around, and ask around.
I'll have a look for it, and see what it's like..
RM> Btw, IMHO, Borland's manuals have gone downhill in recent years
RM> (unlike their compilers). Don't regard them as bibles.
I've noticed that, TC++ 3.0's manual is pretty well.. umm.. limited, it
doesn't help ya that much with much :)..
ÿ
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™.