1 Star 0 Fork 0

tian_ya123/Java-Algorithm

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Abecedarian.java 523 Bytes
一键复制 编辑 原始数据 按行查看 历史
ylb 提交于 2019-05-09 19:32 +08:00 . docs: update the whole repository
package Others;
/**
* An Abecadrian is a word where each letter is in alphabetical order
*
* @author Oskar Enmalm
*/
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;
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Java
1
https://gitee.com/lxw01/Java-Algorithm.git
git@gitee.com:lxw01/Java-Algorithm.git
lxw01
Java-Algorithm
Java-Algorithm
master

搜索帮助