For the first time I did Alibaba pen exam, I had never done any online school recruitment questions except ACM. It was a bare test. The overall feeling is that for me, I feel that time is not enough, I feel that the time is tight and my brain is messy. I will summarize this pen question.
If you don't talk much about it, just answer the question and answer.
The average duration of each person's stay is 20 minutes, so there are 400 people in total 20 minutes before the opening, and 20 people have arrived, but they do not necessarily go out, note that the average time, all museums should accommodate at least 500 people
A list of two-way loops. All elements can be traversed from any element.
Connect to the following elements first
S-> next = p-> next;
P-> next-> Prev = s-> next;
Connected to the previous Element
P-> next = s;
S-> pre = P;
The answer is obvious.
Drawing can be implemented
The rotation time is 1 second.
A 24
B 20
C 7
D14
The total time is 73, so the average turnover time is 16.25.
There are two ways to sit
Dynamic Allocation is in the heap.
Yield () temporarily releases CPU control from the running state to the runnalbe state, but it may still be scheduled. The sleep () thread specifies to sleep for a period of time wait () the main difference between the sleep () and yeild () methods in the thread can continue to be executed only when other threads call the notify () notifyall () method of this object.
: 1. Sleep ()
The method will give other threads the opportunity to run, regardless of the priority of other threads, so it will give the opportunity for lower-priority threads to run; yeild () the method will only give the thread with the same priority or higher than itself the opportunity to run 2. the sleep () method declaration throws an interruptionexception, while the yeild () method does not. 3. the sleep () method has higher portability than the yeild () method. 4. the sleep () method causes the thread to enter the blocking state. The yeild () method enables the thread to enter the ready state. The currently running thread can call the join () method of another thread, the currently running thread will be switched to the blocking state until the execution of another thread ends, and it will resume running join () in two forms: Public void join () and public void join (long timeout) can set the blocking time
The sleep () method is congested. When there are two threads (thread 1 and thread 2), the priority of thread 1 is higher than that of thread 2, and thread 1 sleep () then thread 2 can get the running opportunity
When a thread has a higher priority than the current thread, the high priority will seize the CPU and run it. The yield () method is paused for a period of time, and this period of time is unknown, it will give the thread with the same priority as the current thread a running opportunity.
Scheduling of multiple threads with the same priority is not necessarily time-based. multi-core CPU may be scheduled at the same time.
First, the complexity of sorting, insertion sorting, and Bubble Sorting is O (n ^ 2)
The worst sorting of quick sorting is time complexity O (N ^ 2)
Heap sorting requires that a large top heap or a small top heap be known, because it does not understand the series features, so it is not recommended that the complexity be O (nlgn );
Therefore, fast sorting is optimal.
TCP/IP is built on the three-way handshake protocol
What I did may be wrong. I hope you can raise it and keep updating it.
Alibaba pen exam (2015) is being updated