ext_129945 ([identity profile] cxi162.livejournal.com) wrote in [personal profile] logomancer 2004-03-08 07:38 am (UTC)

Eh, with Google these days if you missed it in class it's no big deal. Try "avl tree node rotate". BackInMyDay(tm) it wasn't so easy to look things up. The project is big, but if you get the AVL tree working that's 90% of it. Throw in an STL list, some command processing and you're done.

In-order traversal is simple. Here's some recursive pseudo code. You can also do it iteratively, but it's more complex:

 inorder(tree)
 begin
     if tree is null, return;

     inorder(tree.left_subtree);
     print(tree);
     inorder(tree.right_subtree);
 end 

Post a comment in response:

(will be screened)
(will be screened if not validated)
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

If you are unable to use this captcha for any reason, please contact us by email at support@dreamwidth.org