PartI:
1、 What is the difference between deadlock and starving?
2、 Please list some typical page replacement algorithms. Introduce the design and performance respectively.
3、 Please indicate the time complexity and space complexity of the sort algorithms in the table.
Name | Average | Worst | Memory |
Insertion Sort |
|
|
|
QuickSort |
|
|
|
Heapsort |
|
|
|
Merge Sort |
|
|
|
4、 Please generate a binary tree according to the following traversal sequence.
Preorder traversal sequence: F、B、A、D、C、E、G、I、H
Inorder traversal sequence: A、B、C、D、E、F、G、H、I
5、 Compose its corresponding regular expression for following grammar:
S——> 0A |1B
A——>1S|s
B——>0S|0
6、 Construct a finite automata that accepts strings of zeros and ones that contain even number of zeros and odd number of ones.
7、 一道Java题
8、 Draw UML diagrams to describe the Bridge pattern and explain benefits/drawbacks.
9、 Please explain the difference between clustered and non-clustered indexes.
10、 Please explain lock used in DBMS. What are 2-phase locking and 2-phase commit?
11、 超级长
Part II:
1、(Java) What would be the output of the command “java SetName DEF”?
Public class SetName
{
public static void setThisName(String name, String newName)
{ name=newName;}
Public static void main(String[] args)
{
String name=”ABC”;
setThisName(name,args[0]);
System.out.println(“The name is “+name);
}
}
(A) ABC
(B) The name is java
(C) The name is SetName
(D) The name is DEF
(E) The name is ABC
2、(Java) What is the output of the program below?
Public class Mistake
{
Public static void main(String[] args)
{
Try
{
System.out.println(“Good”);
Throw new Exception();
}catch(Exception e)
{
System.out.println(“Bad”);
}finally{
System.out.println(“ugly”);
}
}
}
(A) Good
Bad
(B) Good
Bad
Ugly
(C) Good
Ugly
(D) Bad
Ugly
3、(Java)Differentiate between .ear, .jar, and .war file。
4、In the C programming language, explain the differences among storage classes static 、register、 extern and volatile
5、Please give the result of the following program
main()
{
int a,b,c,d;
a=10;
b=a++;
c=++a;
d=10*a++;
cout<<b<<c<<d<<endl;
}
6、Please determine whether x is a certain power of 2 with only one statement.
7、(Unix) What is signal?How to handle signal?
8、(Unix) What is asynchronous I/O, why it is requried?
9、(Unix) After a fork(), two processes exist: a parent and a child. Which processes will execute first?
10、11、 12C #题
Part III:
1、 计算24点的题目,四个数字是4,4,10,10
2、 How many digits does the decimal representation of 2^120?
3、 How would you find out if a machine’s stack grows up or down in memory?