Name that Poker hand - Tiny Code Challenge

Nah, for the Tiny Poker challenge.

Tbh I hadn’t given it much thought, just emphasizing that micro-optimisation can only get you so far - an algorithmic change might give much more significant gains.
Though if the algorithm doesn’t benefit from a virtually free & unbounded stack, it’s unlikely recursion will offer a more efficient solution.

I did wonder if Java 8’s lambda syntax might be able to give significant gains ( e.g. “myList.forEach(System.out::println)”), unfortunately the package locations of even the most basic class requirement (java.util.Arrays) sinks that idea pretty quickly.

Yeah I can’t really think of how recursion could benefit h() off the top of my stack head.

If they were using an older version of Java (circa Java 1.5), you’d be able to completely destroy the Java FizzBuzz highscore with this:

class S{static{for(int i=0;i<100;)System.out.println((++i%3<1?"Fizz":"")+(i%5>0?i%3>0?i:"":"Buzz"));}}

Back then the static initializer would execute before the main thread threw the “No Main method” error.
As that error is delivered to stderr, not stdout, it’d still fulfill the competition’s requirements.

Alas, not to be.

Yup, I tried using that static initializer instead of a main method but it didn’t work :frowning: