View gist:93973fc0750d7e42dec3fdb1812475ac
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
<!-- https://docs.github.com/en/free-pro-team@latest/graphql/overview/explorer --> | |
query { | |
viewer { | |
repositories(isFork: false) { | |
totalCount | |
} | |
} | |
} | |
<!-- RESULTS --> |
View main.app
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 <iomanip> | |
#include <fstream> | |
#include <termios.h> | |
#include <stdio.h> | |
using namespace std; | |
int main( int argc, const char *argv[] ) | |
{ |
View Treap.h
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
#ifndef TREAP_H | |
#define TREAP_H | |
#include <climits> | |
#include "UniformRandom.h" | |
#include "dsexceptions.h" | |
#include <iostream> | |
using namespace std; |
View RedBlackTree.h
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
#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
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
#ifndef SPLAY_TREE_H | |
#define SPLAY_TREE_H | |
#include "dsexceptions.h" | |
#include <iostream> | |
using namespace std; | |
template <typename Comparable> | |
class SplayTree | |
{ |
View RadixSort.cpp
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 <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
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
#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
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
#ifndef LEFTIST_HEAP_H | |
#define LEFTIST_HEAP_H | |
#include "dsexceptions.h" | |
#include <iostream> | |
using namespace std; | |
template <typename Comparable> | |
class LeftistHeap | |
{ |
View BinaryHeap.h
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
#ifndef BINARY_HEAP_H | |
#define BINARY_HEAP_H | |
#include "dsexceptions.h" | |
#include <vector> | |
using namespace std; | |
template <typename Comparable> | |
class BinaryHeap | |
{ |
View QuadraticProbing.cpp
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 "QuadraticProbing.h" | |
#include <iostream> | |
using namespace std; | |
bool isPrime( int n ) | |
{ | |
if( n == 2 || n == 3 ) | |
return true; | |
if( n == 1 || n % 2 == 0 ) |
NewerOlder