Ad
  • Custom User Avatar

    Thanks yourself! My solution could use a lot of improvement; I'm just getting back into codewars and programming puzzles.

    Streams can be very effective. I'd say they are mandatory knowledge for Java devs.

    And to clarify my OP regarding Character.getNumericValue(), I like it because it's very explicit that you're retrieving a number value rather than implicitly converting from char to int with String.charAt().

  • Custom User Avatar

    I kind of like the use of Character.getNumericValue() here.

  • Custom User Avatar

    This line .mapToInt(value -> value) is redundant. The map() stage before it already converts the string array to an Integer, so you might as well mapToInt() directly.

  • Custom User Avatar

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