home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / os / msdos / programm / 8655 < prev    next >
Encoding:
Text File  |  1992-08-20  |  1.4 KB  |  35 lines

  1. Newsgroups: comp.os.msdos.programmer
  2. Path: sparky!uunet!decwrl!world!jkenton
  3. From: jkenton@world.std.com (Jeff Kenton)
  4. Subject: Re: Sorting/Printing
  5. Message-ID: <BtA5C2.HqE@world.std.com>
  6. Organization: Kenton Systems Corporation, Weston MA
  7. References: <1992Aug20.022202.2349@menudo.uh.edu>
  8. Date: Thu, 20 Aug 1992 11:31:12 GMT
  9. Lines: 24
  10.  
  11. In article <1992Aug20.022202.2349@menudo.uh.edu> libh@Jane.UH.EDU writes:
  12. >
  13. >  I am working on a project for a friend that requires me to sort a large file
  14. >of records (2000+ entries generally) that will change from month to month as he
  15. >gets updates so I can never be certain of the number of records.  I would
  16. >appreciate any suggestions on sorting the file.  Right now I am debating on how
  17. >to treat it as a large array on disk and sort it as if it were in memory, but I
  18. >also realize that it would be VERY slow.  Any suggestions would be greatly
  19. >appreciated.
  20.  
  21.  
  22. There are lots of different sorting techniques.  See Knuth, Volume 3.
  23.  
  24. Before you actually go write a serious disk sort (it will teach you
  25. something worthwhile, of course) consider just sorting the new entries
  26. each month and merging them into the old (sorted) file.  Much quicker.
  27.  
  28.  
  29.  
  30. -- 
  31. -------------------------------------------------------------------------
  32. =            Jeff Kenton    (617) 894-4508            =
  33. =                jkenton@world.std.com            =
  34. -------------------------------------------------------------------------
  35.