摘要: 1 /** 2 * 主要思想是通过数组来保存每个字符的出现次数,数组访问O(1),所以总时间复杂度可以保持O(n),通过两次遍历可以解决问题 3 * @param ch 4 * @return 5 */ 6 7 public sta... 阅读全文
posted @ 2015-11-05 14:15 music180 阅读(250) 评论(0) 推荐(0)
摘要: 1 public static void assignSeat(){ 2 int count = 50; 3 int[][] seats = new int[2][count];//int[0]是50个座位,存储值为学生号,int[1]是对应50个学生,值为... 阅读全文
posted @ 2015-11-05 09:48 music180 阅读(576) 评论(0) 推荐(0)