摘要: 1 正确答案: A 2、算法的时间复杂度取决于() 2、算法的时间复杂度取决于() 2、算法的时间复杂度取决于() A 待处理数据的状态 B 处理器的速度 C 问题的规模 D 程序所占空间 正确答案: A C 解析: 比如说快排,初始数据的顺序影响快排的时间复杂度。 3、 1 int f(int x 阅读全文
posted @ 2016-05-02 21:31 UniqueColor 阅读(2658) 评论(0) 推荐(0) 编辑
摘要: 以下程序的输出结果是? 正确答案: B A 、 good and abc B 、 good and gbc C 、 test ok and abc D 、 test ok and gbc解析: 考察值传递和引用传递。对于值传递,拷贝的值用完之后就会被释放,对原值没有任何影响,但是对于引用传递,拷贝的 阅读全文
posted @ 2016-05-02 20:02 UniqueColor 阅读(163) 评论(0) 推荐(0) 编辑
摘要: 给定程序中,函数fun的功能是将带头结点的单向链表逆置,即若原链表中从头至尾结点数据与依次为2、4、6、8、10,逆置后,从头至尾结点数据依次为10、8、6、4、2。 请在程序的下画线处填入正确的内容并将下画线删除,使程序得出正确的结果。 试题程序。 答案: 你的答案 (正确) 1 next 2 N 阅读全文
posted @ 2016-05-02 19:49 UniqueColor 阅读(256) 评论(0) 推荐(0) 编辑
摘要: Virtual是C++ OO机制中很重要的一个关键字。只要是学过C++的人都知道在类Base中加了Virtual关键字的函数就是虚拟函数(例如函数print),于是在Base的派生类Derived中就可以通过重写虚拟函数来实现对基类虚拟函数的覆盖。当基类Base的指针point指向派生类Derive 阅读全文
posted @ 2016-05-02 19:32 UniqueColor 阅读(282) 评论(0) 推荐(0) 编辑
摘要: Problem Description ztr loves lucky numbers. Everybody knows that positive integers are lucky if their decimal representation doesn't contain digits o 阅读全文
posted @ 2016-05-02 19:20 UniqueColor 阅读(449) 评论(0) 推荐(0) 编辑
摘要: Problem Description ztr loves research Math.One day,He thought about the "Lower Edition" of triangle equation set.Such as n=x2−y2. He wanted to know t 阅读全文
posted @ 2016-05-02 18:05 UniqueColor 阅读(172) 评论(0) 推荐(0) 编辑