Skip to content

Instantly share code, notes, and snippets.

Paul Lewallen paullewallencom

Block or report user

Report or block paullewallencom

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@paullewallencom
paullewallencom / main.app
Created Feb 6, 2019
Read Only One (1) 'char' From 'cin'
View main.app
#include <iostream>
#include <iomanip>
#include <fstream>
#include <termios.h>
#include <stdio.h>
using namespace std;
int main( int argc, const char *argv[] )
{
View Treap.h
#ifndef TREAP_H
#define TREAP_H
#include <climits>
#include "UniformRandom.h"
#include "dsexceptions.h"
#include <iostream>
using namespace std;
@paullewallencom
paullewallencom / RedBlackTree.h
Created Jul 31, 2018
Top-Down Red Black Tree
View RedBlackTree.h
#ifndef RED_BLACK_TREE_H
#define RED_BLACK_TREE_H
#include "dsexceptions.h"
#include <iostream>
using namespace std;
template <typename Comparable>
class RedBlackTree
View SplayTree.h
#ifndef SPLAY_TREE_H
#define SPLAY_TREE_H
#include "dsexceptions.h"
#include <iostream>
using namespace std;
template <typename Comparable>
class SplayTree
{
View RadixSort.cpp
#include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include "UniformRandom.h"
using namespace std;
void radixSortA( vector<string> & arr, int stringLen )
{
const int BUCKETS = 256;
View BinomialQueue.h
#ifndef BINOMIAL_QUEUE_H
#define BINOMIAL_QUEUE_H
#include <iostream>
#include <vector>
#include "dsexceptions.h"
using namespace std;
template <typename Comparable>
class BinomialQueue
View LeftistHeap.h
#ifndef LEFTIST_HEAP_H
#define LEFTIST_HEAP_H
#include "dsexceptions.h"
#include <iostream>
using namespace std;
template <typename Comparable>
class LeftistHeap
{
View BinaryHeap.h
#ifndef BINARY_HEAP_H
#define BINARY_HEAP_H
#include "dsexceptions.h"
#include <vector>
using namespace std;
template <typename Comparable>
class BinaryHeap
{
@paullewallencom
paullewallencom / QuadraticProbing.cpp
Created Jul 31, 2018
Quadratic Probing Hash Table
View QuadraticProbing.cpp
#include "QuadraticProbing.h"
#include <iostream>
using namespace std;
bool isPrime( int n )
{
if( n == 2 || n == 3 )
return true;
if( n == 1 || n % 2 == 0 )
@paullewallencom
paullewallencom / AvlTree.h
Created Jul 31, 2018
AVL tree (Adelson-Velskii & Landis)
View AvlTree.h
#ifndef AVL_TREE_H
#define AVL_TREE_H
#include "dsexceptions.h"
#include <algorithm>
#include <iostream>
using namespace std;
template <typename Comparable>
class AvlTree
You can’t perform that action at this time.