Check if string has all the letters of the alphabet

前端 未结 15 1143
终归单人心
终归单人心 2020-12-19 17:51

What would be the best logic to check all the letters in a given string.

If all the 26 letters are available in the provided string, I want to check that and perform

15条回答
  •  有刺的猬
    2020-12-19 18:19

    Not a optimal solution but it works.

    String a= new String("the quick brown fox jumps over the lazy dog");
            int n=a.length();
            int[] b= new int[123];
            char x;
            boolean flag=true;
            for(int i=0;i

提交回复
热议问题