blob: e48f2544aac65a70162dde8c2ef40bc09f979a0d (
plain)
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
41
42
43
44
45
46
47
|
#pragma once
#include <stdio.h>
class IntDoubleLink;
class IntDoubleLinkedList {
public:
IntDoubleLinkedList();
virtual ~IntDoubleLinkedList();
public:
virtual void insertAtStart(int);
virtual void insertAtEnd(int);
virtual bool removeAtStart();
virtual bool removeAtEnd();
virtual void initFirstElement(int);
public:
virtual IntDoubleLink *getHead();
virtual IntDoubleLink *getTail();
public: // voor vraag 1
virtual void rapidBubbleSort();
public: // voor vraag 2
virtual void insertAction(int code);
virtual int undo();
virtual int redo();
virtual int getCurrentAction();
private:
IntDoubleLink* actionCursor = nullptr;
public: // alleen voor het gemak
virtual void showAll();
private:
size_t size = 0;
IntDoubleLink* head = nullptr;
IntDoubleLink* tail = nullptr;
private:
virtual int _indexOf(IntDoubleLink*);
};
|