CodeEval: Fizz Buzz (Java)

Finally managed to get some spare time in order to do this. Helped be clear my head a bit. Here’s my quick 1 minute solution to CodeEval’s fizz buzz problem in Java:

Upon submitting, CodeEval marked my solution as unique (go figure!) which was a bit weird. However, I thought I could do better. So, here’s a second approach using lambdas:

This takes slightly longer (3-5 ms) and uses more memory.

Manthan Dave
I like awesome things. Currently transforming the world bit by bit. I'm a Software Engineer. (All views my own)

Leave a Comment

Your email address will not be published. Required fields are marked *

%d bloggers like this: