Ad
  • Default User Avatar

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

  • Default User Avatar

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

  • Default User Avatar

    Your code always returns value after first iteration. You can easily see that if you add one print().

  • Default User Avatar

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

  • Custom User Avatar

    Your code is wrong. Not a kata issue.

    Ignore letter case.

  • Default User Avatar

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

  • Custom User Avatar

    Good bit of code golf. But definitely wouldn't want to come across this in a production codebase.

  • Custom User Avatar

    You need to import the libraries yourself.

  • Default User Avatar

    Why it doesnot has Arrays.stream()?

  • Default User Avatar

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

  • Custom User Avatar

    To OP: Please mark your post as having spoiler content next time.

  • Custom User Avatar

    That's because you have a subtle error in your logic: your code will return in the first iteration of the loop. Your code translates to something similar to: if this, return this, else return that (first iteration). By adjusting your overall structure (which in this case, is just modifying number of tabs/spaces for some line(s)), your code will pass.

  • Default User Avatar

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

  • Custom User Avatar

    It never is.

  • Custom User Avatar

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

  • Loading more items...