I hereby claim:
- I am maxdeliso on github.
- I am maxdeliso (https://keybase.io/maxdeliso) on keybase.
- I have a public key whose fingerprint is 5416 C7C7 B984 60A7 AF60 45F4 D607 7D70 940 5 FC77
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| module AStack(Stack, push, pop, top, size, stackTo) where | |
| data Stack a = Empty | |
| | MkStack a (Stack a) | |
| push :: a -> Stack a -> Stack a | |
| push x s = MkStack x s | |
| size :: Stack a -> Int | |
| size s = length (stkToLst s) where | |
| stkToLst Empty = [] |
| /* | |
| * perms.c | |
| * | |
| * maxdeliso@gmail.com | |
| * | |
| * read strings from stdin and print the permutations in lex order. | |
| * | |
| * permutations are computed using constant space. | |
| * | |
| * algorithm transliterated to C from TAOCP, Vol 4A, Part 1 |
I hereby claim:
To claim this, I am signing this object:
| module Main where | |
| import System.Environment | |
| import System.Exit | |
| import Sierpinski | |
| main = do args <- getArgs | |
| if length args /= 2 then | |
| error "two integer args required: width and iteration count" | |
| else |
| import scala.io.StdIn | |
| object Bits{ | |
| def main(args: Array[String]): Unit = { | |
| while(true) { | |
| println( | |
| prettyBits( | |
| Option[String](StdIn.readLine) match { | |
| case Some(str) => for { | |
| by <- str.map(_.toByte) |
| .PHONY: clean | |
| RM=rm | |
| CC=clang | |
| CFLAGS=-Wall | |
| OUT=tree_test | |
| MODULES=tree tree_test | |
| OBJ=$(addsuffix .o, $(MODULES)) |
| CC=gcc | |
| LD=ld | |
| CFLAGS=-Wall -Wextra -pedantic -std=c11 -g | |
| LDFLAGS=-entry run | |
| uch: uch.o | |
| $(LD) $(LDFLAGS) $< -o $@ | |
| uch.o: uch.c |
| /* | |
| * A DFS/BFS implementation for simple unweighted connected graphs. | |
| * Max DeLiso <maxdeliso@gmail.com> | |
| * 10/31/15 | |
| */ | |
| #include <iostream> | |
| #include <cassert> | |
| #include <stack> |
| class Graph | |
| def initialize | |
| @edges = {} | |
| end | |
| def addEdge(src, dst) | |
| @edges[src] ? (@edges[src] << dst) : (@edges[src] = [dst]) | |
| @edges[dst] ? (@edges[dst] << src) : (@edges[dst] = [src]) | |
| @edges.each {|k, v| v.uniq!} | |
| end |