Interview-Java byte face experience (offer has been obtained)

Preface

Either byte beating or heart beating, which one do you choose? Hahaha, the three-dimensional script prepared for everyone, there is a summary of interview experience and related interview skills in the back, please read it yourself. I'm afraid you forgot to find it, it is recommended to collect it first, and then read it.

one side

  1. How is the back end of the school project built
  • 答:tomcat,springboot, mybatis
  • Remarks: I
    didn’t answer well here. It should be expanded, saying that the junior level was limited and there was no high-availability. If you do it now, you will use VIP+dual-ng+dual-services for simple high-availability.
  1. "Small programs do not support caching binary, so small pictures are BASE64 encoded and cached locally", is there any other optimization solution?
  • Answer: The optimization plan is CDN, which explains the general principle of CDN
  • Note:
    You can also answer the picture compression
  1. Talk about the encryption and decryption scheme in combination with the project
  • Answer: I talked about asymmetric encryption (two application scenarios), digital digest, digital signature, symmetric encryption, and SSL. I talked about it for a long time.
  1. How to write the report interface and how to support flexible modification without deployment
  • Answer: All kinds of CASE WHEN, IFNULL, save sql in the database, take out sql from db and then execute, there is a management background to change at any time
  1. How does es aggregate calculations
  • Answer: No
  1. How to do range query in es
  • Answer: I talked about es fragmentation, routing, and brute-force range schemes
  1. es participle principle
  • Answer: Answered the word segmentation process, inverted index, etc.
  1. new life cycle of an object
  • Answer: I talked about jmm, and it took a long time to answer
  1. In addition to not having enough space in the old age, when will fgc be triggered?
  • Answer: System.gc() will also be triggered. The production environment generally adds DisableExplicitGC to disable System.gc()
  1. When the target age of the new generation reaches 15, they will be promoted to the old generation. Why is it 15?
  • Answer: It should be an empirical value. If the value is too small, the object may easily die after reaching the old generation. If it is too large, the object may be replicated in the young generation, increasing the cost.
  • Remarks The
    correct answer should be because the markword part of the object header, the binary length of the age field storing the generational age is 4, so the maximum value is 15
  1. Why does mysql have the principle of the leftmost prefix
  • Answer: It is the structure of the B+ tree that determines the leftmost prefix. I answered the page structure of mysql (free area, user record area, page directory...), index structure, clustered index, secondary index. I answered it for a long time.
  1. Algorithm question
  • Find the substring in the parent string, namely indexOf

    • Answer: KMP is not written, but violence is written.
      Remarks:
  • During the interview, there were questions about "what will be returned when the substring does not exist", "whether the first one is returned when the substring appears multiple times", and there is a special case that is not considered: what is returned when the substring is an empty character

  • There is also a faster string matching algorithm than KMP: BM (Boyer-Moore) algorithm

    • After the brute force code runs through, it reminds me of KMP, but I didn’t remember it, and only said that there was a next array...

Two sides

  1. Combined project
  2. How does F5 realize session retention in the project
  • Answer: add cookie
  1. Ask about the ISO seven-layer model, which layer is the F5 plus cookie, and which layer is the ip hash?
  • Remarks:
    Cookie is only available in the http protocol, so at the application layer
    ip hash may be at the application layer or the network layer. If it is client->lb lb->server, it is the application layer, because it needs to be re-launched HTTP request, if it is achieved by modifying the target address through the DNAT protocol, it is the network layer
  1. F5 is different from Ha. Why is F5 better than Ha? With the same hardware configuration, is F5 better than Ha?
  • Remarks:
    "Why F5 is better than Ha" did not answer at the time. The correct answer should be generally, F5 is four-layer load balancing, and Ha is seven-layer. However, F5 can also be used for seven-layer load balancing. At this time, the performance should not be much worse.
  1. dr mode of lvs

  2. VIP drift principle of keepalived

  • Note:
    No answer, the answer is VRRP agreement
  1. Talk about the skills you are good at
  • Talked about the innodb page structure and index principle
  1. sql tuning experience

  2. How big is the largest table in the entire database of the project

  3. Which microservice framework is familiar with

  4. Which source code have been seen

  • Answer the hashmap, ask why the capacity of the hashmap is 2 to the power of n
  1. What are you studying recently and why

  2. How to understand high availability

  3. Interviewer: Do you have anything to ask me

  • Q: What aspects need to be reinforced
  • Interviewer: The project is more traditional, others are fine

Three sides

  1. Introduce project difficulties

  2. Zero copy

  3. How to troubleshoot a few cases of FGC

  4. What are the reasons why the video suddenly gets stuck when using the vibrato on the phone

  5. Why leave

  6. No algorithm, it's almost half an hour in total

to sum up

Be prepared for some high-frequency problems, including technical and non-technical

  • Technology category:
  • Which source code have been seen
  • Which technology is more familiar
  • What are you studying recently and why
  • What areas of the project need to be improved
  • What are the difficulties of the project
  • How to deal with sudden traffic

Non-technical:

  • How do you usually learn, how to learn new knowledge
  • What are your advantages and disadvantages
  • How do colleagues evaluate themselves
  • Why leave
  • What else to ask

Introduce project skills

  • You must be cautious when speaking about the project. If you speak too deeply, the interviewer may ask questions in depth for any term, and you will not be able to answer it; if you speak too shallowly, the interviewer will feel that the project is not difficult enough and is not interested in listening;
  • When talking about the project, finish talking about the pain points, and then talk about the solutions one, two, three, and their respective advantages and disadvantages, what plan was selected in the final production, and whether the logic is clear during the interview is also a very important indicator of inspection;
  • Highlight a deep understanding of the business;
  • Use specific numbers to explain the situation, such as qps, db data volume, etc.;
  • Intersperse the eight-part essay into the project

Algorithmic skills

  • Pay attention to the code specifications, such as comment first (write the comment first and then write the code), write a comment on the return value of special circumstances (such as what to return when the input parameter is empty)
  • Be good at asking questions to interviewers and reflect your own logical ability. Take "finding substrings from the parent string as an example (that is, to implement the indexOf method)". Questions that can be asked are:
    • The substring does not appear in the parent string, what is returned
    • The substring is empty, what to return
    • If the substring appears multiple times, whether to return only the first position
  • If the time is enough, follow the above. If the time is not enough, don’t consider too many boundary conditions. Just pass one case.

Other techniques

  • Don't speak too fast, otherwise the interviewer can't understand;
  • At least one function must be powerful enough to blow for a long, long time. Ask the difficulty of the project and wait until it is time to blow;
  • At least one technology must be in-depth study, redis, mysql, jvm... all do, if you blow it, you will get a lot of points;
  • When answering questions, first talk about the conclusion and then the process. Under the premise of knowing the conclusion, listen to you and understand the process;
  • Don't invest in a bunch of companies at the beginning, you may find that your resume needs to be revised after one or two interviews;
  • Don't lie to Dachang HR face, hr is very professional and easy to see;
  • The interview is actually three aspects of eight-legged essay, project, and algorithm. If there are no problems in all three aspects, then it is stable. Eight-legged essays can be memorized and projects can be packaged, but the algorithm can only rely on accumulation. If you want to enter a big factory, you should first go through the questions and start in half a year.

Examples of common problems

  • What else to ask

  • answer:

    • hr face: training system and promotion mechanism
    • Technical: What aspects need to be strengthened, or ask the interviewer for some workplace experience
    • Remarks: The thing that humans need most is recognition. Ask the interviewer about his workplace experience. After he finishes talking, you express your approval, and he gets what humans need most.
  • Why leave

    • Think of a better platform, do more challenging work, and hope that there are more outstanding people around
  • How to learn

    • Increase the depth through reading books, and increase the breadth through fragmented methods such as official accounts, columns, and blogs;
    • Understand/understand does not necessarily mean you really understand, what you say is what you really understand, so after learning a knowledge point, you must ask and answer yourself;
    • Reading books and selecting classic books;
    • When studying, you must be good at asking questions, according to the details of the problem, no problem is the biggest problem

Reference

Practitioner 12138-programmer interview experience (https://www.jianshu.com/p/c23a381dc017)

Talk

Thank you very much for seeing this. If you think the article is well written, please pay attention to it and share it (it is very, very useful for me).
If you think the article needs to be improved, I look forward to your suggestions for me, please leave a message.
If you want to see something, I look forward to your message.
Your support and support is the greatest motivation for my creation!

Guess you like

Origin blog.csdn.net/Aaron_Tang_/article/details/114882915