-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDLL.h
More file actions
40 lines (36 loc) · 620 Bytes
/
DLL.h
File metadata and controls
40 lines (36 loc) · 620 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#ifndef DLL_H
#define DLL_H
#include <iostream>
using namespace std;
typedef int el_t;
struct node
{
el_t elem;
node* next;
node* prev;
};
class DLL
{
private:
int count;
node* front;
node* rear;
public:
void LLError(string msg);
DLL();
bool isEmpty() const;
~DLL();
DLL(const DLL& l);
el_t deleteFront();
el_t deleteRear();
void addRear(el_t el);
void addFront(el_t el);
void displayAll() const;
void printAllReverseDLL();
bool search(el_t e);
void deleteNode(el_t e);
void deleteNodes(el_t e);
void addInOrderAscend(el_t e);
void addInOrderDescend(el_t e);
};
#endif