Created
September 30, 2019 04:43
-
-
Save thenaveensaggam/4c80a1a6d596822aae0909bcd81a67ae to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public boolean stringE(String str) { | |
int count = 0; | |
for(int i = 0; i< str.length(); i++) { | |
if(str.charAt(i) == 'e') { | |
count++; | |
} | |
} | |
return (count >= 1 && count <= 3); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment