diff options
| author | Steve Lee <me@xiangyangli.com> | 2017-12-10 22:57:14 +0800 |
|---|---|---|
| committer | Steve Lee <me@xiangyangli.com> | 2017-12-10 22:57:14 +0800 |
| commit | b9659f0ae3b4766cccea4f6f62d883cd61f98620 (patch) | |
| tree | d485d99ac36651950a58f9867619eb3bd77143b2 /Computer_Science/data_structures/chapter_4/binary_search_tree.h | |
| parent | 1ab42d462e335898902c6513c7f71c5a591c945a (diff) | |
| download | 42-b9659f0ae3b4766cccea4f6f62d883cd61f98620.tar.xz 42-b9659f0ae3b4766cccea4f6f62d883cd61f98620.zip | |
avl_tree impl
Diffstat (limited to 'Computer_Science/data_structures/chapter_4/binary_search_tree.h')
| -rw-r--r-- | Computer_Science/data_structures/chapter_4/binary_search_tree.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Computer_Science/data_structures/chapter_4/binary_search_tree.h b/Computer_Science/data_structures/chapter_4/binary_search_tree.h index da128f8..2d9425e 100644 --- a/Computer_Science/data_structures/chapter_4/binary_search_tree.h +++ b/Computer_Science/data_structures/chapter_4/binary_search_tree.h @@ -14,4 +14,12 @@ SearchTree insert(elem_t x, SearchTree t); SearchTree delete(elem_t x, SearchTree t); elem_t retrieve(Position p); +struct TreeNode +{ + elem_t elem; + SearchTree left; + SearchTree right; +}; +typedef SearchTree Tree; + #endif /* _BINARY_SEARCH_TREE_H */ |
