摘要: #import "ViewController.h" #import "UIColor+Hex.h" #define XMGColor(r,g,b) [UIColor colorWithRed:(r) / 256.0 green:(g) / 256.0 blue:(b) / 256.0 alpha:1] @interface ViewController () @property (weak, ... 阅读全文
posted @ 2017-02-22 22:50 iFat 阅读(171) 评论(0) 推荐(0) 编辑
摘要: /* 折半查找法(二分法) :折半查找法使用的前提是数据必须 是有序的。 */ public class Demo5 { public static void main(String[] args) { int[] arr = {12,15,17,19,30}; int index = halfSe 阅读全文
posted @ 2017-02-22 14:41 iFat 阅读(515) 评论(0) 推荐(0) 编辑
摘要: import java.util.Arrays; /* 冒泡排序 : 相邻的两个元素比较,符合条件交换 位置。 */ public class Demo4 { public static void main(String[] args) { int[] arr = {2,5,10,8,1}; //所 阅读全文
posted @ 2017-02-22 14:19 iFat 阅读(182) 评论(0) 推荐(0) 编辑