This file contains hidden or 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
template<typename Key, typename Value> | |
class RedBlackTree | |
{ | |
public: | |
using size_t = std::size_t; | |
RedBlackTree() | |
: _root(nullptr) | |
{ } |
This file contains hidden or 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
template<typename T> | |
class ArrayStack | |
{ | |
public: | |
using size_t = std::size_t; | |
static const size_t minimum_capacity; | |
This file contains hidden or 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
template<typename T> | |
class UniquePointer | |
{ | |
public: | |
using pointer_t = T*; | |
using const_pointer_t = const T*; | |
using reference_t = T&; |
This file contains hidden or 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
#ifndef TRIE_HPP | |
#define TRIE_HPP | |
#include <algorithm> | |
#include <array> | |
#include <stdexcept> | |
#include <string> | |
template< | |
typename Value, |
This file contains hidden or 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
template<typename T> | |
class MaxHeap | |
{ | |
public: | |
using size_t = std::size_t; | |
static const std::size_t minimum_capacity; | |
MaxHeap(std::size_t capacity = minimum_capacity) |
This file contains hidden or 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
template<typename Key, typename Value> | |
class SeparateChainingHashTable | |
{ | |
public: | |
using size_t = std::size_t; | |
using pre_hash_t = std::function<size_t(const Key&)>; | |
static const size_t minimum_capacity; |
This file contains hidden or 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
template<typename Key, typename Value> | |
class SeparateChainingHashTable | |
{ | |
public: | |
using size_t = std::size_t; | |
using pre_hash_t = std::function<size_t(const Key&)>; | |
static const size_t minimum_capacity; |
This file contains hidden or 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
template<typename Key, typename Value> | |
class RBTree | |
{ | |
public: | |
using size_t = std::size_t; | |
RBTree() noexcept | |
: _root(nullptr) |
This file contains hidden or 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
#!/usr/bin/env python3 | |
# -- coding: utf-8 -*- | |
"""Module for the Davis-Putnam-Logemann-Loveland (DPLL) Algorithm.""" | |
from __future__ import print_function | |
from __future__ import unicode_literals | |
import re | |
import sys |