2013笔试题
2 进程通信
Named event
Named pipe
Critical section
Shared memory
4 设计模式——类别
Creational pattern
A. Facade
B. Singleton
C. Bridge
D. Communication
5 which of the follow TCP packets sequence is correct for TCP handshake where setting up a connections?
A. SYN, SYN+ACK,SYN+ACK
B. SYN+ACK,SYC+ACK,SYN
C. SYN, SYN+ACK, RST
D. SYN, SYN, ACK
似乎没有正确答案
参考:http://baike.baidu.com/view/1003841.htm
6 the characteristic of functional programming :
A. Avoidance of changing state and mutable data
B. Referential transparency
C. Lambda calculus
D. Thread-safe
C似乎是对的
参考:http://baike.baidu.com/view/3476448.htm
7 the Hypertext Transfer Protocal(HTTP)
相关联的知识点:Stateless protocol
Status code such as 404 stands for "page not found"
参考:http://baike.baidu.com/view/9472.htm
8 which is correct about shallow copy in C++
A. Shallow copy only copy reference
B. Shallow copy will cause possible physical pointer duplication
C. Shallow copy may cause problems in case of assignment or parameter passing to function
D. Copy constructor may mitigate the risk of shallow copy
参考:http://en.wikipedia.org/wiki/Copy_constructor
10 虚函数,虚继承
//此代码用于测试虚函数与虚继承的调用关系
#include<iostream>
using namespace std;
class base{
public:
char value(){return 'a';}
virtual char virtualvalue(){return 'v';}
};
class derived : public base{
public:
virtual char value(){return 'd';}
};
class virtualderived : virtual public base{
public:
char value(){return 'z';}
char virtualvalue(){return 'x';}
};
void main(){
base* b1=new derived();
base* b2=new virtualderived();
cout<<b1->value()<<' ';
cout<<b1->virtualvalue()<<' ';
cout<<b2->value()<<' ';
cout<<b2->virtualvalue()<<' ';
}
12 二叉树的遍历
13 计算复杂度 T(x) = 1(x<=1), T(n)= 25 *T(n/5)+n^2
A. O(nlogn)
B. O(n^2logn)
C. O(n^2)
D. O(n^3)
14 进程,处理机调度,进程优先级相关
15 完全二叉树的高度等
18 greedy strategy
最小生成树的算法: prim kruskal
最短路径的算法 :dijkstra floyd
19 各种排序算法(熟练)