home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / os / vms / 21951 < prev    next >
Encoding:
Internet Message Format  |  1993-01-25  |  1.4 KB

  1. Path: sparky!uunet!gatech!usenet.ins.cwru.edu!agate!ucbvax!gwdgv1.dnet.gwdg.de!moeller
  2. From: moeller@gwdgv1.dnet.gwdg.de ("GWDGV1::MOELLER")
  3. Newsgroups: comp.os.vms
  4. Subject: re: LIB$ROUTINES and Balanced Binary Trees
  5. Message-ID: <9301260059.AA24744@ucbvax.Berkeley.EDU>
  6. Date: 25 Jan 93 17:48:22 GMT
  7. Sender: daemon@ucbvax.BERKELEY.EDU
  8. Distribution: world
  9. Organization: The Internet
  10. Lines: 20
  11.  
  12. Wayne Pearson <WPEARSON@KEAN.UCS.MUN.CA> asks:
  13. > I noticed that there were three routines to manipulate balanced binary trees
  14. > in the LIB$ run time libraries. These routines were LIB$INSERT_TREE,
  15. > LIB$LOOKUP_TREE, and LIB$TRAVERSE_TREE. Is the any reason that theres no
  16. > corresponding LIB$ routine to delete a node from a balanced binary tree?
  17.  
  18. For the reasons:
  19. (a) Textbooks tend to leave the "routine to delete a node" as an
  20.     exercise for the reader :-)
  21. (b) VMS utilities (for which the LIB$routines were written) can live without.
  22. (c) The LIB$routines allow for duplicate keys. It isn't obvious how to
  23.     define and solve the deletion problem in that case.
  24.  
  25. If your keys are unique, I might provide you (upon request)
  26. with a "compatible" LIB_DELETE_TREE() written in VAX C.
  27.  
  28. Wolfgang J. Moeller, GWDG, D-3400 Goettingen, F.R.Germany | Disclaimer ...
  29. PSI%(0262)45050352008::MOELLER      Phone: +49 551 201516 | No claim intended!
  30. Internet: moeller@gwdgv1.dnet.gwdg.de   | This space intentionally left blank.
  31.  
  32.