Skip to content

Latest commit

 

History

History
24 lines (19 loc) · 767 Bytes

File metadata and controls

24 lines (19 loc) · 767 Bytes

UniqueLab 2018 Spring Assignment 1, Part 2

Implement set in C++ STL.

You are expected to implement:

  • insert(const T&)
  • erase(const T&)
  • clear()
  • count(const T&) // return 1 if element exists, 0 otherwise
  • empty()
  • size()

Please refer to STL documents for details.

Since time is short, you needn't implement features of templates or iterators. Just let T = double and change return values of most functions to void instead.

However, you must use LLRB as internal data structure for this assignment. Any other balanced BSTs are not acceptable.

Recommended Reference

Learn C++ in Y minutes
Left Leaning Red-Black Trees, Princeton