递归判断数组递增
2015-10-11 00:00
176 查看
public class string {
public static void main(String[] args) { int []a = new int[]{2,3,4,5,8,1}; System.out.println(fun(a, a.length)); }
private static boolean fun(int[] a, int length) { if(length == 1) return true; else return fun(a, length - 1) && (a[length -1] > a[length - 2]); }
}
相关文章推荐
- 大数相加
- Eclipse替代ndk-gdb断点调试Android NDK程序
- java枚举之简要
- java之反射构造方法
- java反射之成员变量的反射
- swift中字符串截取方法(substring)
- Linux中变量$#,$@,$0,$1,$2,$*,$$,$?的含义
- opencv3中scharr滤波器
- 随便记录下内容
- mac上的终端里添加mysql命令
- Mac OS X 10.11下如何安装MySQLdb?
- Objective-c self的用法
- [ogre] ogre遇到一些小问题
- apktool反编译
- android反编译
- 关于android4.4及以上版本无法恢复还原短信的问题记录与解决
- java 线程学习笔记(二)
- Oracle提高sql执行效率的心得建议
- ElyarAnwar的Android实战笔记---计算器(二) 分享是最好的记忆
- javaweb之生成微信二维码