主题:[讨论]求助一道数据结构的入门习题,急!!!
用一个无序链表LList来实现一个字典ADT,通过其访问操作来实现该字典.
该字典的ADT如下:
template <class Key, class Elem,
class KEComp, class EEComp>
class Dictionary {
public:
virtual void clear() = 0;
virtual bool insert(const Elem&) = 0;
virtual bool remove(const Key&, Elem&) = 0;
virtual bool removeAny(Elem&) = 0;
virtual bool find(const Key&, Elem&)
const = 0;
virtual int size() = 0;
};
不胜感激!
该字典的ADT如下:
template <class Key, class Elem,
class KEComp, class EEComp>
class Dictionary {
public:
virtual void clear() = 0;
virtual bool insert(const Elem&) = 0;
virtual bool remove(const Key&, Elem&) = 0;
virtual bool removeAny(Elem&) = 0;
virtual bool find(const Key&, Elem&)
const = 0;
virtual int size() = 0;
};
不胜感激!