gnu-misc-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gnu avl trees


From: castironpi
Subject: Re: gnu avl trees
Date: Sat, 23 Aug 2008 00:50:45 -0700 (PDT)
User-agent: G2/1.0

On Aug 22, 10:26 pm, Ben Pfaff <b...@cs.stanford.edu> wrote:
> castironpi <castiro...@gmail.com> writes:
> > Success, thanks for your time.  I feel that the line:
>
> >       q = (struct pavl_node *) &tree->pavl_root;
>
> > in _4.5.2 Step 3: Update Balance Factors_ could use an explanation in
> > the docs, something like, 'because q.pavl_link[ 0 ] is the only
> > property ever read or set'.  Otherwise it is definitely confusing.
>
> See section 4.7, exercise 1 (and the answer):
>        http://adtinfo.org/libavl.html/Inserting-into-a-BST.html
> --
> Ben Pfaffhttp://benpfaff.org

Ah yes, in the answer: "so this is fine as long as we never try to
access any member of *p except bst_link[0]."  It is definitely worth
putting that in more places.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]