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/ruby | |
class Coins | |
def initialize(maxcoins, maxdepth=maxcoins, maxlen=maxcoins+2) | |
@maxcoins = maxcoins | |
@maxdepth = maxdepth | |
@maxlen = maxlen | |
@solution = nil | |
@coins = Array.new(@maxlen, ' ') |
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
#!/bin/bash | |
trap "echo interrupted && exit 2" INT TERM QUIT | |
limit=100 | |
op=open | |
while getopts ":csw:" opt; do | |
case $opt in |