Skip to content

Instantly share code, notes, and snippets.

View Amadeeus's full-sized avatar

Amadeus Oertel Amadeeus

  • ETH Zürich
  • Zürich
View GitHub Profile
@Amadeeus
Amadeeus / graph.cpp
Created May 28, 2019 21:02
C++ Graph Implementation
#include <iostream>
#include <vector>
template <typename T>
struct GraphNode {
T data;
std::vector<int> adjIndices;
};
@Amadeeus
Amadeeus / stack.cpp
Last active May 26, 2019 23:24
C++ Stack Implementation (array-based)
#include <array>
#include <exception>
#include <iostream>
template <typename T>
class Stack {
public:
T *stack_array_;
int top_;
@Amadeeus
Amadeeus / singly_linked_list.cpp
Last active March 20, 2022 23:16
C++ Singly Linked List Implementation
#include <iostream>
template <typename T>
struct Node {
T data;
Node *next;
};
template <typename T>
class LinkedList {