Ad
  • Custom User Avatar

    As I've said in one of the comments that belongs to another comment, but this time spoiler-free:

    There is a huge issue though with this approach. The 26 is hard coded and assumes that the user only uses letters from the english alphabet. What If I as a German were to use ä, ö, ü or ß? This would also count as a distinct letter (you can use unicode for Java, like \u00c4 for letter Ä), which would lead to a max letter count of 30 in theory.
    So a sentence with all english letters and with one of these special letters added would become false even though there are all 26 letters plus the one odd one available, since the total count would now be 27! And if I were to leave out an english letter (we expect false because of this) and added one of my german letters, this method would return true since the total count is 26! That would be wrong.

  • Custom User Avatar

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

  • Custom User Avatar

    Oh wow this is some really long and complicated solution for this issue! But I guess it works :)