Alibaba intern recruitment test questions, Alibaba intern recruitment test
Classification: mathematical algorithm C ++ programming language 12618 people read comments (93)
Question:
Select C for the first question. Don't explain it. Just use bitwise AND.
Select D for the second question. Do not explain. 2*3 * sizeof (int *) = 48 (a pointer of 8 bytes on a 64-bit machine)
C. I'm not sure, but it should be
D is the fourth question. It is obvious that the answer is the complement code.
5th select D and access the error (this is the Java code)
Select B for question 6th. Everyone knows this.
7th question decisive
Question 1 is decisive. B. I don't want to explain it. You can understand it.
Question 9th is B and '0' is not '\ 0'. Note that
The decisive question in 10th is Fibonacci, apparently C. The first few are 0, 1, 2, 3, 5, 8, 13, 21.
The calculation amount is 2 ^ 35*2 ^ 4. Now the computer clock speed is 2 ^ 30, so it is about a few minutes, here we assume that the number of commands for a recursive call is 16 (push, pop, ret, etc)
Even though the author calculated the result, he chose several seconds. When he came back, he thought about it. The seconds were a bit far away, and the second was forced.
Question 12th is B, obviously n = 4N1 + 3N3 + 2N2 + N1 + 1 = N4 + n3 + n2 + n1, so N0 = 82, not explained
The answer to Question 13th is "D". I will not explain this old question.
Question 14th is C. I want to find it in binary mode.
The 15th question is the Fulkerson Algorithm, which is calculated as 46. You can select an augmented path each time.
He gave 65 items and 20 yuan for others. He should lose 85 yuan (the second landlord, and added 16th yuan, and the result was decisive and wrong)
Question 17th is 2. I do not explain the Fermart small theorem. 2 ^ 6 mod 7 = 1, SO 2 ^ 100 = 2 ^ 4 = 16 = 2 mod 7
I think it's B, right?
19th questions, not very detailed, select A, not sure.
I feel that I have not read this question clearly.
Question C, probability and series operations, not explained
Question 21st, decisive B, D, malloc, new applied for Virtual Memory, however, windows can actually apply for physical Memory, using VirtualAllocEx API
22nd question CD
The landlord chose B, C, and B. He didn't see the meaning of the question clearly. The question said the Binary Search Tree, egresses, and D is correct and can be converted into a balanced binary tree within a constant time, because it can be converted into an ordered linked list in constant time, it is a constant time to convert a sequential linked list into a Balance Tree (recursion)
In fact, 10 ^ 15 <= n ^ 14 <10 ^ 16, 12 <= n <= 13, so select 8/7 (I am introducing n <10 ^ () and then calculate n <= 13,
I chose DE, but A did not. I forgot A style on the left, and I learned A bloody lesson.
Question 24th, D. Because the first one is white, the probability of A is 2/3.
This topic is controversial and will not be explained here
25th, not possible. 2.8*10 ^ 8 bit is required, while Bluetooth can only transmit 2.4*10 ^ 7bit. Therefore, 0.2 S is required for a frame.
Question 26th (mnlogn) is not explained and merged.
The 27th question is obviously 17 minutes
1, 2 first cross the river, then 1 back, 5, 10 cross the river, 2 back, 1, 2 cross the river
Time: 2 + 1 + 10 + 2 + 2 = 17. If you do not want to explain it, you can consider the problem of n people crossing the river. In fact, the principle is the same.
28th, two wrong places 1, without considering only one number, 2, it may be an endless loop (give you arrays 0, 2, 3 for search 1)
Both of the landlords thought of it. When I wrote it, I forgot to write 1, a tragedy.
29th questions, decisive SkipList, O (PLogpN) understood by people on earth)
Note that the SkioList is searched from top to bottom. The search time for one layer is O (p), and the total LogpN layer, so the total time is O (PlogpN)