Ad
  • Custom User Avatar

    Initially all chars are converted toUpperCase:

    1. So c > 90 will be only non letter; why do we need this:
      .map(c -> c > 90 ? (char) ((c % 91) + 65) : c)
    2. since all charaters are Caps from the beginning, why do we need to convert again here:
      map(i -> (count++ % 2) == 0 ? i.toUpperCase() : i.toLowerCase())
  • Custom User Avatar

    WOW, brilliant! I'm highly impressed by this ootb solution, accompanied by detailed comments!

  • Custom User Avatar

    I don't see correlation betwwen the two repeating values in both strings. IMHO can be different number each and will still find a "match"

  • Custom User Avatar

    Converting the whole string to upper case during each iteration is extremely ineffective!