As far as I can see, Odersky also doesn't follow the hint, and hence does
not pass the test cases provided with the original problem. The hint is not
really a hint but rather a change to the problem. The original problem is
elegant and essentially consists of inverting a clearly defined
I agree that Odersky's version doesn't match the spec. Hint or no hint, it
doesn't look like he even attempts to address the issue of inserting single
digits into the encoding. He's solving a different, somewhat simpler
problem.
I don't agree that the hint changes the problem statement. The
i did not need the hint to develop a correct solution. the hint just
clarifies what could have been misunderstood.
Am 23.09.2012 21:03, schrieb Mark Engelberg:
I agree that Odersky's version doesn't match the spec. Hint or no hint,
it doesn't look like he even attempts to address the issue of
The spec says if there is no word in the dictionary that can be used in
the partial encoding starting at digit k+1 then a digit can be used. Some
people interpreted that as no word from the dictionary can be used in a
solution. Others interpreted that as no word from the dictionary can be
used
here's my solution:
https://gist.github.com/3766508
the original (done in 2 hours) solution is commented out. i made some
improvements and solved the whole thing in 39 lines (counting only the
content of main). doing it in the minimal amount of lines was not my
goal. i was trying to minimize the
On Sat, Sep 22, 2012 at 11:27 AM, Dennis Haupt d.haup...@gmail.com wrote:
here's my solution:
https://gist.github.com/3766508
the original (done in 2 hours) solution is commented out. i made some
improvements and solved the whole thing in 39 lines (counting only the
content of main). doing
nice... he approximately does with for loops what i do without the
sugar, hence all the chained calls. i noticed i do a bit more than
necessary (the reverse thing is a remainder of an early
misinterpretation of the spec), but who cares, it works :)
however, odersky's short version doesn't solve
i stumbled upon this:
http://page.mi.fu-berlin.de/prechelt/phonecode/
the results:
http://page.mi.fu-berlin.de/prechelt/Biblio/jccpprt_computer2000.pdf
summary: concise languages bashed c, c++ and java if you look at the time
needed to complete the program. however, in 1999, there were no good
On Thu, Sep 20, 2012 at 10:52 AM, Dennis Haupt d.haup...@googlemail.comwrote:
i stumbled upon this:
http://page.mi.fu-berlin.de/prechelt/phonecode/
the results:
http://page.mi.fu-berlin.de/prechelt/Biblio/jccpprt_computer2000.pdf
summary: concise languages bashed c, c++ and java if you
what i am really interested in is the time necessary to finish the task.
i'll probably need to modify the requiremet so the participants cannot
cheat - or i'll allow cheating deliberately and say this is the result
under optimal conditions (meaning the raw coding time is measured, no
debugging,
This problem would be ideally suited for core.logic except because of the
hint (http://page.mi.fu-berlin.de/prechelt/phonecode/hint2.html) you'd
need to do something far more ugly.
On Thursday, September 20, 2012 5:07:52 PM UTC+2, David Nolen wrote:
On Thu, Sep 20, 2012 at 10:52 AM, Dennis
On Thu, Sep 20, 2012 at 1:19 PM, Jules julesjac...@gmail.com wrote:
This problem would be ideally suited for core.logic except because of the
hint (http://page.mi.fu-berlin.de/prechelt/phonecode/hint2.html) you'd
need to do something far more ugly.
The solution I came up with doesn't attempt
gaaah you almost made me read it
Am 20.09.2012 19:19, schrieb Jules:
This problem would be ideally suited for core.logic except because of
the hint (http://page.mi.fu-berlin.de/prechelt/phonecode/hint2.html)
you'd need to do something far more ugly.
On Thursday, September 20, 2012 5:07:52
i came to a correct solution without that hint :)
just like in reality, i started coding without reading the spec. a few
surprises came along the way (what? they want it like this? they just
added this to mock me!)
i spent about 50% of the time writing code and 50% thinking about it.
i'll tell my
14 matches
Mail list logo