Ad
  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    @idubrov: Good catch! Or rather, good throw. I just closed that loophole, and your solution is no longer valid. Sorry...

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    That's a good point, but I wouldn't worry too much. I don't know much about Java Security and applets, but I'd assume they took care of it. One can do quite nasty things with reflection (see the katas referenced in the description). This stuff just goes a little further.

  • Custom User Avatar

    Yeah, it took me about half a day to figure it out. In the end I found it pretty cool that it's possible at all. But maybe there's a much simpler solution. Who knows...

  • Default User Avatar

    Hi, I've actually spotted another one since doing this.
    I posted this as it's one of the problems I tried to solve when learning Java 8 Stream API. To be honest, I'm surprised there aren't more stream-based solutions to the Java kata being posted :)
    Originally, I was going to put an execution time test in to fail the run if it wasn't fast enough, but figured it would be unfair as I wouldn't be able to tell what server-load was.
    I think this is an interesting problem as it's so simple in theory, and the solutions can be really elegant.