# | Line 19 | Line 19 | private: | |
---|---|---|
19 | public: | |
20 | DoublyLinkedList() { front.setNext(&back); back.setPrevious(&front); } | |
21 | ~DoublyLinkedList(); | |
22 | < | void addFront(Type& type); |
23 | < | void addBack(Type& type); |
22 | > | void addFront(const Type& value) { front.addNext(value); } |
23 | > | void addBack(const Type& value) { back.addPrevious(value); } |
24 | > | bool contains(const Type& value) { return front.contains(value, &back); } |
25 | }; | |
26 | ||
27 | template<typename Type> |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |