hasDuplicateLetter 🌶️🌶️
Write a method hasDuplicateLetter that takes a String s and returns true if some character appears more than once in it (anywhere, not necessarily next to each other), and false if all its characters are different. Capital and lowercase letters are different.
For example, hasDuplicateLetter("hello") is true, hasDuplicateLetter("world") is false, and hasDuplicateLetter("abca") is true.
To find a repeat you have to compare every character with every other character. Which two loops give you every pair?
If you start the inner loop at the same index as the outer one, a character is compared with itself.