摘要: 阅读全文
posted @ 2015-03-10 21:55 卖程序的小歪 阅读(115) 评论(0) 推荐(0) 编辑
摘要: Iterator接口public interface Iterator { boolean hasNext(); E next(); void remove();}访问元素前需要使用hasNext进行判断是否有元素存在,如果有再通过next操作获取,直接使用next操作而不进行ha... 阅读全文
posted @ 2015-03-10 21:01 卖程序的小歪 阅读(427) 评论(0) 推荐(0) 编辑
摘要: 尼玛,数组偶数个数的时候取中位数是取中间两者中的前者,还tmd一直再算平均,卧槽#include #include #include #include using namespace std;int min(int a, int b) { return a a(na); for ... 阅读全文
posted @ 2015-03-10 15:54 卖程序的小歪 阅读(162) 评论(0) 推荐(0) 编辑
摘要: 这场考试当年还参加了,当时直接用内置的排序了,否则自己写归并排序浪费时间啊,现在来练习一发。估计又有些节点没在链表里面,当时没考虑这个情况,所以一直有些case没过#include #include #include #include using namespace std;class Node {... 阅读全文
posted @ 2015-03-10 13:16 卖程序的小歪 阅读(204) 评论(0) 推荐(0) 编辑