Implementsorteddictionary ADT . Dictionary is a data structure that is similar to the map ADT, with the major difference that multiple values can share a common key. Implement the sorted version of...


Implementsorteddictionary ADT . Dictionary is a data structure that is similar to the map ADT, with the major difference that multiple values can share a common key. Implement the sorted version of the dictionary data type, base on binary search tree. Your implementation must be a class template that implements the following functions:



  • size() -- number of entries

  • empty() -- true if empty, false otherwise

  • find(k) -- return an iterator to the entry with key k, or the sentinel if k is not present in the map

  • findAll(k) -- return a pair of iterators (b, e), such that all entries with key k lie in the range
    [b, e)


  • erase(k) -- erase by key

  • erase(p) -- erase by iterator

  • begin() -- iterator to beginning

  • end() -- iterator to the end

Work must be done in C++ using Linux's Text editor app! Very important! I'd also like some comments in the code for better explanation. Thank you!
Jan 30, 2021
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here