Last active
December 1, 2015 13:58
-
-
Save cwhite92/8d333d7ff24a7df83b64 to your computer and use it in GitHub Desktop.
AOC Day 1 Golf (credit to jamosaur, phroggyy and mamorunl, thomasruize)
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
<?php $f=$b=0;foreach(str_split(file('i')[0])as$p=>$d)($f-=$d=='('?-1:1)>=0|$b?:$b=$p+1;echo"$f $b"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment