Come see computer professionals! Share three sides of Baidu Java post online (successfully landed! I have got an offer)

background

Introductory computer players for six years, many interviews, large and small, have grown up all the way from Xiaobai, and hope to help students. This interview experience is only suitable for me, an ordinary new person with no background, don’t bother me

Let me first introduce my personal situation. 211 books + 985 masters + computer majors. I participated in Baidu's advance approval of java development. I have already got an offer.

one side

1. The post of delivery is java development. After introducing myself, the interviewer asked me about my basic situation and asked me if I had any specific directions for applying for a job, such as partial algorithm, R&D, database or big data, and if I had some wishes.

2. Dig deep into the project. It involves the ideas and processes of the project; the difficulties encountered in the process and how to solve them; how to improve the performance; the underlying principles of the technology used, etc. (About half an hour)

3. The role of final, finally and finalize

4. The role and difference between synchronized and volatile

5. For the design of some common classes in the Java util package, I talked about HashMap related content. (Underlying structure, determination of subscripts, expansion, thread insecurity, etc.)

6. Do you understand ConcurrentHashMap? (Segment lock before 1.8, CAS+synchronized after 1.8, and why it changed)

7. Does CAS understand? Pros and cons?

8. Have you written specific code for multithreaded programming? (Wrote a simple Web Server)

9. Let me talk about BIO, NIO and AIO. (Blocking/non-blocking, synchronous/asynchronous, and then talk about their respective principles)

10. The garbage collection algorithm commonly used by JVM. (Each algorithm and its advantages and disadvantages, whether it is used for young generation collection or old generation collection, why?)

11. Is the usual development environment Linux? Are you familiar with Linux commands? Give a log file and count the UV and PV. (Emmm only knows the most basic daily operations, not this one...)

12. I just mentioned that you usually read some books. What are you reading recently? What books do you plan to read later? (Recently, I have seen an in-depth understanding of the art of Java virtual machine and concurrent programming. Plan to look at Algorithm 4)

13. Rhetorical link. During the period, I asked if I could get an offer and if I could go for an internship before graduation. (Emmm will have a graduation thesis next semester, and the laboratory will not release it)

14. Algorithm topic: Baidu Hot Search List. Simply put: there is a large file that records all Baidu search records over a period of time, and each line contains a search term. Because the search volume is very large, the file is very large and cannot be stored in it. Find the TopN search terms with the most search times . After the offline coding is completed, reply to the email in about half an hour.

Ideas: 1. Divide a large file into several small files according to the hash value of each line of words. 2. For each small file, use HashMap to count the word frequency, and then use the priority queue to get TOP N 3. Take the TOP N of each file and use Priority queue gets a total of TOP N

(Involving file operations... I'm not very familiar with it, it took fifty minutes)

Two sides (after a week)

1. Introduction

2. Dig deep into the project.

3. The difference between synchronized and ReentrantLock and usage scenarios.

4. The detailed process of synchronized lock upgrade. (No lock -> Biased lock -> Lightweight lock -> Heavyweight lock)

5. Why synchronized was a heavyweight lock before. (Using mutex lock at the bottom layer involves the conversion between user mode and kernel mode, and context switching consumes a lot of money)

6. Why does synchronized only have a lock upgrade process and no lock downgrade process? (Never thought about this question... why...)

7. The concept of deadlock. How to avoid deadlock.

8. What layers does the TCP/IP protocol contain? What are the protocols for each layer? The difference between TCP/UDP and applicable scenarios.

9. System design: online multiplayer web version chat room. You can see everyone's speech, and you can also see the history of the chat room. How to design? (Emmm hasn't understood this kind of questions, pull the hip...)

10. What do you think is your advantage? (The boasting part, of course, you have to boast hard hhhh.)

11. Rhetorical link. I also asked whether I can go to the internship (Is it because the department is short of people...) (After the previous side is over, if there is a next side, it will be notified within a week.)

12. Algorithm topic: For N arrays, calculate the Cartesian product and output. A[1,2,3],B[4,5,6],C[7,8,9], output {1,4,7},{1,4,8},{1,4,9 },{2,4,7}.... It should be a DFS problem without pruning.

Three sides

1. Evaluate your performance on the first two sides?

3. Ask the project, ask very carefully, how each step is realized, the process, if you don’t do it step by step by yourself, it will definitely reveal the stuff

4. What difficulties did you encounter when doing the project

5. What is redis used for? How is the efficiency?

6. How can distributed locks be implemented?

7. Ask some computer basics (finally)

8. The process of java code from writing to running

9. The heap memory is automatically recovered by gc, how to recover the stack memory?

10. What is a stack overflow? What scenarios might stack overflow occur?

11. Ask about the network, do you understand syn attacks? (I have read the blog before and I only know a little bit about it, but the interviewer is very good and said that if I don’t understand it, I won’t ask about this content. I quickly said I don’t understand)

13. Let's change the question, the process of entering the URL to the page display? (Sleeping, I asked)

However, I didn't let me finish. I asked about DNS resolution in detail, and then asked about routing and forwarding in detail, saying that I am quite familiar with this aspect, so there is no need to talk about it.

14. Originally, I wanted to write an algorithm, but it is estimated that the time is almost there, so I didn’t let me write it, and I just asked the link

Ask casually, and then ask when will there be results? The reply said within a week.

chances are for people who are prepared

Friends in need, please be sure to trouble everyone to forward it, because it can help more people in need to see, and then scan the QR code of the editor to get these notes files.

After this time, I reflected on it for a long time, and found that I really had many shortcomings and loopholes, so I have been planning my own learning route recently. Whether you are reviewing for the interview or studying by yourself, I believe what I said is still It's kind of useful.

1. Interview questions

  • BAT Interviewer Handbook

  • Java architecture interview questions

2. Source code interpretation

  • Interpretation of Spring Cloud Alibaba technology stack

  • Java performance tuning combat

  • SpringCloud microservice architecture

3, LeetCode algorithm brushing book

  • Algorithm brushing book

  • Java data structures and algorithms.

  • Programmer code interview guide IT famous company algorithm and data structure problem optimal solution

to sum up

In general, most company interviews have something in common, and I may not have written some repetitions. In addition, there is a little trick to share with everyone. When the interviewer asks you what questions you have, try not to just pass by. It is best to accumulate more questions when preparing for the application. It can be at this time Ask, you can answer questions for yourself, and you can also have a chance to leave a good impression on the interviewer.

 

The above are the interview resources I collected before and after the interview and a study route plan. I hope it will be helpful to everyone. Friends in need, please be sure to trouble you to forward it, because this can help more people in need see it, and then You can get these note files by scanning the QR code of the editor.

Finally, I wish everyone a good place to go and good health.

 

Guess you like

Origin blog.csdn.net/Java6888/article/details/109100086