2014 Netease operation engineer pen questions (Mail O & M) -- answer -- the next day

Source: Internet
Author: User

1. for multiple keywords, the file organization is convenient and efficient ()

A. Ordered file B, inverted file C, hash file D, and B + tree index file

There are four basic ways to organize files: sequential organization, index organization, hash organization, and chain organization. The corresponding file names are: ordered file, index file, hash file, and multi-Keyword file. Which file organization mode is selected depends on the usage and frequency of records in the file, access requirements, external storage nature and capacity.

  Multi-Keyword File: A file that contains multiple keyword indexes is called a multi-Keyword file.

  Inverted tableThe main advantage is that when processing complex multi-Keyword queries, you can perform logic operations such as submit and merge queries in the inverted table, and then access the records after obtaining the results. In this way, you do not need to randomly access each record, and convert the query of the record to the operation of the address set to increase the search speed.

Google uses inverted indexes.

2. Which of the following algorithms can be used to traverse the Network Diagram ()

A. breadth-first search B. depth-first search C. Linear Planning Strategy D. Decision Tree

Extended searchAssume that a vertex v is used to access the adjacent contacts that have not been accessed in sequence after accessing V, and then access the adjacent contacts from these neighboring contacts in sequence, and enable the adjacent contacts of the first accessed vertex to be accessed before the neighbor contacts of the last accessed vertex to be accessed (so you need to use a queue to store the vertex ), it is not until the adjacent contacts of All accessed vertices in the graph are accessed. If there are still unaccessed vertices in the graph, select the unaccessed vertex as the starting point and repeat the above process until all vertices in the graph are accessed.

Deep Priority SearchIs the promotion of tree root traversal. Its basic idea is: starting from a vertex V0 of graph G, access v0, select a vertex vi that is adjacent to V0 and has not been accessed, and then select a vertex VJ that is adjacent to VI and has not been accessed from VI for access. If all the neighboring vertices of the currently accessed vertices have been accessed, return to the last vertex w in the accessed vertex sequence that has unaccessed adjacent vertices, start from W and traverse forward in the same way until all vertices in the graph are accessed.

3. we use a six-tuples <A, B, C, D, E, F> to represent the number of undirected graph vertices of the six nodes. Which of the following six tuples are possible combinations ()

A, <,> B, <,> C, <,> D, <,>

Draw!

4. Which of the following statements about Computability is true ()

A. All problems can finally be abstracted into a computing model. The Turing machine can complete computing within a limited time (although it may take a very long time: modern computer design is based on this theory.

B. If some questions exist, we cannot answer them within a limited period of time: however, all questions can be verified within a limited period of time.

C. Godel (Godel)'s first law specifies that a complete and compatible system of justice does not exist.

D. None of the above statements are correct.

5.16 hexadecimal values c396 and octal values 64474 exclusive or result value (10 hexadecimal) is ()

A, 43690 B, 16660 C, 60350 D, 20375

The calculator calculates the value. If the value is the same, the value 0 cannot be obtained. If the value is the same, the value 1 cannot be obtained.

6. Which of the following are typical NP problems ()

A. Turing shutdown Problem B. Sorting C. 0. 1. Backpack problem D. Enumeration all subsets of Finite Sets

7. The following sequence string exists: agdccdddgfbbffggdddgggeffddcccdddfgaaa now needs to be hffman-encoded for this string, then the letter F corresponds to the bit value (in the binary format )()

A, 10 B, 11 C, 110 d, 101

Solution: Total: 38 characters, and F is 6 characters.

Where a: 4, B: 2, C: 5, D: 12, E: 1, F: 6, G: 8

Start by following the rules!

Hoffmann code(Huffman coding) is a coding method and an entropy coding algorithm used for lossless data compression, this method is used to construct a code word with the Shortest Average Length Based on the probability of occurrence of characters, which is sometimes called the best encoding.

HC Method: Queue by the probability of occurrence, and add the two smallest probabilities to the queue as the new probability and the remaining probability, then add the two smallest probabilities, and then requeue, until the last change is 1. The two probabilities of "0" and "1" are added and added at each addition. The last "1" is started from the symbol ", sort the "0" and "1" encountered on the route in the sequence from the lowest Bit to the highest bit, that is, the Hoffman code of the symbol.

8. If the process management is improperly designed, it will lead to a "deadlock". To deal with deadlocks, a typical Banker algorithm belongs to (1), and Resource deprivation belongs to (2 ).

A. (1) = deadlock prevention, (2) = Deadlock Avoidance

B. (1) = deadlock prevention, (2) = deadlock relief

C. (1) = deadlock avoidance, (2) = Deadlock Prevention

D. (1) = deadlock avoidance, (2) = deadlock relief

Deadlock: Two or more processes are waiting for each other due to resource competition during execution. They cannot be pushed forward without external force.

Four Conditions for the system to generate a deadlock:

(1) mutex condition: A process schedules the resources allocated to it, that is, a resource is only occupied by one process within a period of time. If there are other processes requesting resources at this time, the requester can only wait until the processes occupying the resources are released after use.

(2) request and persistence conditions: the process has maintained at least one resource, but has made new resource requests. The resource has been occupied by other processes. At this time, the request process is blocked, however, you cannot release other resources that you have obtained.

(3) Non-deprivation condition: resources obtained by a process cannot be deprived until they are used up. They can only be released by themselves when they are used up.

(4) loop wait condition: When a deadlock occurs, there must be a process-a circular chain of resources, that is, a process set {P0, P1, P2 ,···, p0 in PN} is waiting for resources occupied by P1; P1 is waiting for resources occupied by P2 ,......, PN is waiting for resources occupied by P0.

Banker algorithm: We can regard the operating system as a banker. The resources managed by the operating system are equivalent to the funds managed by bankers. The process requests the operating system to allocate resources, which is equivalent to loans from users to bankers. The operating system allocates resources for the process according to the banker's rules. When the process applies for resources for the first time, it needs to test the maximum resource demand of the process, if the system's existing resources can meet its maximum demand, the resources will be allocated based on the current application volume; otherwise, the allocation will be postponed. When the process continues to apply for resources during execution, first test whether the sum of the number of resources occupied by the process and the number of resources applied for this time exceeds the maximum resource demand of the process. If the quota is exceeded, the allocation of resources is rejected. If the quota is not exceeded, the system tests whether the existing resources can meet the maximum resource required by the process. If the quota is exceeded, resources are allocated based on the current application volume, otherwise, the allocation will be postponed.

9. Which of the following statements about database indexes is true ()

A. Creating indexes for certain fields can reduce disk space usage of related database tables;

B. Creating indexes for certain fields can effectively improve the reading and writing efficiency of related fields;

C. Common database management systems generally use hash tables to store indexes. (The implementation of indexes usually uses B and B + trees of its variants)

D. The existence of database indexes may reduce the efficiency of deleting related fields;

 

2014 Netease operation engineer pen questions (Mail O & M) -- answer -- the next day

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.