Ad
  • Custom User Avatar

    I would add a test inside the for loop to test if after the replace the b is identical with previous iteration. And if identical return false. That means that nothing has changed and there is an issue in the strig, so fail fast is covered here.
    Otherwise the for goes to braces.length/2 doing nothing.

  • Custom User Avatar

    It took me a while to figure that this is java 8. Nice for the ones who work with. But for the rest...