- Check the sample exam.
Here’s a couple more questions:
- Consider a trinary TreeSet.
- Each node has two values: lval, rval
- Each node has three children: left, right, and center.
- What’s the asymptotic complexity for add and contains?
- Consider a set implemented with the data stored in a stack.
- How do we implement add, contains, remove?
- What’s the complexity of those operations?