summaryrefslogtreecommitdiff
path: root/algo1w3/IntDoubleLinkedList.h
diff options
context:
space:
mode:
Diffstat (limited to 'algo1w3/IntDoubleLinkedList.h')
-rw-r--r--algo1w3/IntDoubleLinkedList.h47
1 files changed, 47 insertions, 0 deletions
diff --git a/algo1w3/IntDoubleLinkedList.h b/algo1w3/IntDoubleLinkedList.h
new file mode 100644
index 0000000..e48f254
--- /dev/null
+++ b/algo1w3/IntDoubleLinkedList.h
@@ -0,0 +1,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*);
+};
+