Write this blog is in order to record their own in the autumn recruit interview process and experience, yesterday evening written the Kingdee early batch of written examination. There are also the problems of the test, but more is the C language problem, which in the data structure of the internal sort of the main.
Let me say a few words about the subject that impresses me.
1. int a=0,b=0,c=0;
if (a=b+c)
printf ("a");
else printf ("B");
This is a choice question, I was on the computer test is a link error, in fact, I really do not know the reason why
2. The problem of the degree of two fork tree, this is a multiple-choice. Because for a long time did not touch the data structure, many options are not very take the quasi
Binary tree Two degree node and leaf node number relationship:
Suppose the total node N, two degrees X, once node y, the number of leaf nodes (set to Z).
n nodes, then a total of branches N-1
A two-degree node has 2 branches, leaves do not, once the node has 1, then deduced a total of 2x + y
2x + y = N-1;
x + y + z = N;
From the above two-type, z = x + 1;
A two-tree with 20 leaf nodes and a node (19) with a degree of 2
3. The time complexity of the sorting problem, this is also a selected question
The following is a general table summarizing the characteristics of all the sorting algorithms that are common to us.
| Sorting method |
Average Time |
Worst case scenario |
Degree of stability |
Extra Space |
Note |
| Bubble |
O (N2) |
O (N2) |
Stability |
O (1) |
N Hours is better |
| Exchange |
O (N2) |
O (N2) |
Unstable |
O (1) |
N Hours is better |
| Choose |
O (N2) |
O (N2) |
Unstable |
O (1) |
N Hours is better |
| Insert |
O (N2) |
O (N2) |
Stability |
O (1) |
Most of the sorted is better |
| Base |
O (LOGRB) |
O (LOGRB) |
Stability |
O (N) |
B is the true number (0-9), R is cardinality (1000) |
| Shell |
O (NLOGN) |
O (NS) 1<s<2 |
Unstable |
O (1) |
S is the selected group |
| Fast |
O (NLOGN) |
O (N2) |
Unstable |
O (NLOGN) |
n Good when Big |
| Merge |
O (NLOGN) |
O (NLOGN) |
Stability |
O (1) |
n Good when Big |
| Heap |
O (NLOGN) |
O (NLOGN) |
Unstable |
O (1) |
n Good when Big |
4. Write a single case pattern
Public Singleton class{
private static volatile Singleton instance=null; Forgot to write the volatile keyword in the local written test.
Private Singleton () {}
public static Singleton getinstance () {
if (instance==null) {
Synchronized (Singleton.class) {//This place was written instance again.
if (instance==null) instance=new Singleton ()//the place forgot double check in the written test.
}
}
return instance;
}
}
5. Both TCP and UDP adopted the Protocol which is the Protocol, select the question: DNS. This really don't know ...
There are a lot of questions you don't remember.
Summing up, feel this time the pen is really the end of the defeat ... Basic knowledge did not come and review, there are many multiple-choice topics are not in doubt. A word or basic knowledge is not solid.
After this written test has received a lesson, must pay attention to the foundation cannot yangaoshoudi. Or I will be the same, today to record the bar, began to work ...