Decision Tree code golf
- by Chris Jester-Young
In Google Code Jam 2009, Round 1B, there is a problem called Decision Tree that lent itself to rather creative solutions.
Post your shortest solution; I'll update the Accepted Answer to the current shortest entry on a semi-frequent basis, assuming you didn't just create a new language just to solve this problem. :-P
Current rankings:
107 Perl
121 PostScript (binary)
136 Ruby
154 Arc
160 PostScript (ASCII85)
170 PostScript
192 Python
199 Common Lisp
214 LilyPond
222 JavaScript
273 Scheme
280 R
312 Haskell
314 PHP
339 m4
346 C
406 Fortran
462 Java
476 Java (well, kind of)
718 OCaml
759 F#
1741 sed
C++ not qualified for now