Skip to content

An STL-compatible container for BinarySearchTree that implements various tree traversal methods (in-, pre-, post-order) through an iterator.

License

Notifications You must be signed in to change notification settings

W-y-l-t/STL-compatibleBST

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

STL-compatibleBST

An STL-compatible container for Binary Search Tree that implements various tree traversal methods in-, pre-, post-order through an iterator.

Technical specification

The container is a template parameterized by the type of stored objects, the comparison operator and the allocator, as well as meets the following requirements for stl-compatible containers:

The tree traversal method is implemented through an iterator, and the "++" operator should move the iterator to the next element in the tree, according to the traversal rule.

Traversals example

Features

  • STL-compatible, so std:: methods like find, sort, etc. are working with my container
  • Used Tag Dispatch Idiom
  • Without extra memory space

About

An STL-compatible container for BinarySearchTree that implements various tree traversal methods (in-, pre-, post-order) through an iterator.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published