Skip to content

Instantly share code, notes, and snippets.

View howardlau1999's full-sized avatar
🎯
Focusing

Howard Lau howardlau1999

🎯
Focusing
View GitHub Profile
@howardlau1999
howardlau1999 / rbtree.cpp
Last active December 6, 2018 05:02
Red Black Tree
#include <iostream>
enum Color { RED, BLACK };
template <class K, class V>
class RBTree {
struct RBNode {
K key;
V value;
size_t N;
@howardlau1999
howardlau1999 / quick_sort.cpp
Created December 2, 2018 16:12
C++ Template Metaprogramming
#include <iostream>
struct TrueType {
constexpr static bool value = true;
};
struct FalseType {
constexpr static bool value = false;
};
@howardlau1999
howardlau1999 / insertion_sort.cpp
Last active December 1, 2018 14:22
C++ Templates Metaprogramming
#include <iostream>
struct TrueType {
constexpr static bool value = true;
};
struct FalseType {
constexpr static bool value = false;
};
//
// _oo0oo_
// o8888888o
// 88" . "88
// (| -_- |)
// 0\ = /0
// ___/`---'\___
// .' \\| |// '.
// / \\||| : |||// \
// / _||||| -:- |||||- \