Same here. The hard part was understanding the problem. (It felt very much like "A train leaving SF at 50kph ..." word problems.) But after that the code wasn't so bad.
I think the possible "gotcha" here is that they do not want a reverse alphabetically sorted string, which, if you're not careful about the requirements, could be what you try to build and have it trip you up.
Friday
The Last Word (CodeJam):
You are the next contestant on this show, and the host has just showed you the string S. What's the winning last word that you should produce?
CodeJam
Python!
F#
Testing it (console)
Awesome -- this one (for me) was a lot easier than they made it sound!
Same here. The hard part was understanding the problem. (It felt very much like "A train leaving SF at 50kph ..." word problems.) But after that the code wasn't so bad.
I think the possible "gotcha" here is that they do not want a reverse alphabetically sorted string, which, if you're not careful about the requirements, could be what you try to build and have it trip you up.
Rust
usage:
last_word(.exe) < small.in > small.txt
TypeScript
Go
Common Lisp
Quick little test...