class Solution {
public String solution(String sentence) {
String answer = "";
String sentence_lowerCase = sentence.toLowerCase(); //to lower case alphabet
String a = "abcdefghijklmnopqrstuvwxyz";
String[] hits = {};
//If input length is less than 26 then it can never be complete
if(sentence_lowerCase.length() < 26)
{
return "FALSE";
}
for (char ch = 'A'; ch <= 'Z'; ch++)
{
if (sentence_lowerCase.indexOf(ch) < 0 && sentence_lowerCase.indexOf((char) (ch + 32)) < 0)
{
return "FALSE";
}
}
answer = "perfect";
return answer;
}
}
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter