Work on adding example for basic datastructs

This commit is contained in:
2020-03-23 10:30:27 +00:00
parent cb00bea475
commit 5bbca3d0e9
4 changed files with 115 additions and 0 deletions

View File

@@ -0,0 +1,38 @@
#ifndef LDS_H
#define LDS_H
#include <iostream>
enum CONST {
MAX=10
};
template <typename T>
class ListNode {
public:
ListNode() : next(NULL) {};
ListNode(T val) : data(val), next(NULL) {};
// Sneak more of Push() through node concstr?
// ListNode(T val, LinkedList& l) data(val), next(l.Top());
private:
T data;
ListNode* next;
};
template <typename T>
class LinkedList {
public:
LinkedList() {};
void Push(T val) {};
T Pop();
T Top();
void Display() const;
private:
// ListNode data[MAX];
};
#endif