Baidu vertical search Department practices

Source: Internet
Author: User
I had an internship with Baidu before and got an offer. The following are the questions during the internship. I hope to give a reference to those who share the same experience with Baidu. Baidu vertical search Department practices

 

Side

1. Background question: Introduce yourself, ask about the project experience, and describe what you did before.

 

 

Language:

1. c ++ regarding vtable, whether the class corresponds to vtable or the object corresponds to vtable (class)

2. Can constructor be a virtual function (I am vague: I personally think it is not required from the perspective of language design)

3. Differences between malloc and new

4. If the Destructor is not a virtual function, give an example.

5. After a new function is created, there is no Delete. what technology is used to solve the memory leakage?

6. The process of compiling CPP into a binary file

7. What is the difference between the delete array? If deletep is used to delete the array, what is the problem?

 

 

OS:

The new memory allocation process should provide a memory management method.

If there are multipleProgramApply for memory at the same time, how does the operating system achieve mutex access at this time?

 

 

Massive Data Query problems:

There are often errors in user input. There are three types of errors: One more, one less, and one wrong.

If we store all the correct inputs in the database, and what technologies are used, such as inputting an incorrect query, We can get all the correct queries.

This question is what HR reminds me. In fact, I have no idea.

I think of a hash table.

Perform the following operations for correct data storage:

For example, if you want to store abcdef, you must first store the abcdef status as 1, which indicates that it is a winning string.

Remove each location of the string and store it separately for further detection.

Then there is bcdef ACDEF ....

During retrieval, if the target string is a and a is retrieved, and if the retrieved tag is 1, the input is correct. If the retrieved string is marked as 0, the user enters less than one. Remove one character from each position of. If the retrieved tag is 1, the user enters one more. If the retrieved tag is 0, the user inputs an error.

 

Two sides:

 

1. I talked about the project experience for about 15 minutes.

2. A temple has n steps and a person stands below. He wants to go to the M step. Suppose he has only two options: 1. go up 3 steps 2. go down two steps. How many steps does it take to reach the M step. Give the coreAlgorithmAnalyze complexity

(DP can solve)

(By the way, if there are too many steps, how should we allocate DP [N] And then talk about the difference between local variables, Global static variables, and heap variables, including the lifecycle, allocation size limit, read/write speed, and when to use the variable)

 

3. Simplified question: there are two arrays, A [n], B [m], representing two sets.

3.1 now finding the intersection of Sets gives the complexity of the algorithm

3.2 If both sets have sorted the order, how can we find the intersection?

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.