Synced the directory structure to that of Python repo

This commit is contained in:
Varun Upadhyay
2017-10-13 06:57:26 -07:00
parent 7dd8fd16cc
commit e53249ba23
25 changed files with 0 additions and 0 deletions

17
Others/Abecedarian.java Normal file
View File

@ -0,0 +1,17 @@
//Oskar Enmalm 29/9/17
//An Abecadrian is a word where each letter is in alphabetical order
class Abecedarian{
public static boolean isAbecedarian(String s){
int index = s.length() - 1;
for(int i =0; i <index; i++){
if(s.charAt(i)<=s.charAt(i + 1)){} //Need to check if each letter for the whole word is less than the one before it
else{return false;}
}
}
return true;
}