Live coding of Ruby Quiz 7 - Arithmetic Puzzle "Countdown"
Unscripted, unedited, (uncut) - Haskell Uncut
Read more at my blog post: http://codinguncut.com/arithmetic-puzzle/
You can find the code of this video at: https://github.com/codinguncut/Countdown
The description of the task: http://www.rubyquiz.com/quiz7.html
source 100 5 5 2 6 8, target 522. result: (5*100)+((5+6)*2) = 522
It took me so much longer to implement this than I had hoped.
In the interest of making it watchable I have (against my explicit promise) cut out four 5-minute sections that proved to be cul-de-sacs. They are of course annotated.
Music by Oniric (http://www.jamendo.com/de/artist/337244/oniric)