This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
template <typename T> | |
struct Node { | |
T data; | |
Node *next; | |
}; | |
template <typename T> | |
class LinkedList { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <array> | |
#include <exception> | |
#include <iostream> | |
template <typename T> | |
class Stack { | |
public: | |
T *stack_array_; | |
int top_; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <vector> | |
template <typename T> | |
struct GraphNode { | |
T data; | |
std::vector<int> adjIndices; | |
}; |