-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathLL.h
More file actions
40 lines (36 loc) · 637 Bytes
/
LL.h
File metadata and controls
40 lines (36 loc) · 637 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 LQUEUE_H
#define LQUEUE_H
#include <iostream>
using namespace std;
typedef int el_t;
struct node
{
el_t elem;
node* next;
};
class LL
{
private:
int count;
node* front;
node* rear;
void printAllReverse(node* p);
public:
void LLError(string msg);
LL();
bool isEmpty() const;
~LL();
LL(const LL& l);
el_t deleteFront();
el_t deleteRear();
void addRear(el_t el);
void addFront(el_t el);
void displayAll() const;
void printAllReverse();
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