Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #ifndef LIST_H
- #define LIST_H
- #include <iostream>
- using namespace std;
- class List
- {
- private:
- struct Node
- {
- int value_;
- Node* next_;
- Node(int value = 0, Node * next = nullptr) : value_(value), next_(next) {};
- };
- Node* head_;
- Node* tail_;
- int minValue_;
- void clear();
- public:
- List();
- ~List();
- List(List&& old) noexcept;
- friend ostream& operator<< (std::ostream& out, const List& list);
- void operator+(int value);
- void operator+=(int value);
- void removeMinimal();
- void removeRepeats();
- void removeLess();
- void reduce();
- void insert(const List& other);
- void insertSorted(int value);
- void joinSorted(const List& other);
- };
- #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement