#include <iostream>
using namespace std;
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 <map> | |
#include <stack> | |
bool IsBalanced(const char delimStr[]) { | |
using std::make_pair; | |
std::map< char, char > delims; | |
const char* curChar = delimStr; | |
std::stack< char > store; |
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
import scala.io.Source; | |
import scala.collection.mutable; | |
class Anagrams(file:String){ | |
private val combinations = mutable.Map.empty[String, List[String]]; | |
def run() : List[List[String]] = { | |
for( word <- Source.fromFile(file).getLines ){ | |
val characterStr = sortByChars(word.trim); |
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
old_roman = (('M', 1000), | |
('D', 500), | |
('C', 100), | |
('L', 50), | |
('X', 10), | |
('V', 5), | |
('I', 1)) | |
new_roman = (('M', 1000), | |
('CM', 900), |
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 <stdlib.h> | |
#include <stdio.h> | |
#include <stdbool.h> | |
#include <string.h> | |
#include <assert.h> | |
// no actual pointer should have this value, due to alignment | |
static void* DELETED = (void*)1; | |
static int TABLE_SIZE = 701; |
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 <exception> | |
#include <ostream> | |
using std::exception; | |
using std::ostream; | |
template<typename T> | |
class BinaryHeap |
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
#!/usr/bin/env python | |
# | |
# drafts2trello.py | |
# Sean Korzdorfer | |
# Mon 2013-05-04 | |
import argparse | |
import requests | |
import sys | |
import json |
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
/* | |
* Sugar for type detection working across frames and browsers ;) | |
* | |
* Detected types | |
* | |
* 'arguments', 'array', 'boolean', 'date', 'document', 'element', 'error', 'fragment', | |
* 'function', 'nodelist', 'null', 'number', 'object', 'regexp', 'string', 'textnode', | |
* 'undefined', 'window' | |
* | |
* Copyright (c) 2009 Daniel Steigerwald (http://daniel.steigerwald.cz), Mit Style License |
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://packagecontrol.io/packages/sublime-github | |
import Html exposing (..) | |
main = | |
text "Hello, World!" |
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
module Sample where | |
import Stack exposing (..) | |
import String | |
import Html exposing (..) | |
reverseString : String -> String | |
reverseString str = | |
String.split "" str | |
|> Stack.fromList |
OlderNewer