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
import Data.List (elemIndex) | |
import Data.Maybe (fromJust) | |
-- A pile of coins is just an Int describing how many coins are in the pile | |
type CoinPile = Int | |
-- A state in the coin game is just a number of piles | |
type CoinState = [CoinPile] | |
-- A player is either Me or You | |
data Player = Me | You deriving (Eq) |
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
#include <stdio.h> | |
#include <time.h> | |
/* TODO: resume.h */ | |
typedef struct { | |
char * company; | |
char * location; | |
char * title; |
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
#include <stdio.h> | |
typedef struct ll { | |
int value; | |
struct ll *next; | |
} ll; | |
void print_list(ll *list_head) | |
{ |
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
#include <errno.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#ifndef ENOMEM | |
#define ENOMEM 12 | |
#endif |
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 python | |
import sys | |
import math | |
import re | |
""" Find the index of the single difference between two strings """ | |
def find_char_difference(str1, str2) : | |
if len(str1) != len(str2) : | |
return None; |
NewerOlder