preface

  1. The project is of little reference significance, and all issues are not involved
  2. The author’s technical level is limited, the interview may be difficult, if it is not helpful to you, please forgive me
  3. After two HR interviews, I didn’t let them go. I was worried that I might take unnecessary risks if I wrote them out.
  4. After watching, you can follow the public account: Bestsort (Bestsort’s secret base) bookingHigh qualitycontent
  5. I would like to thank CBU and all the interviewers of CRO, especially the little sister of CBU who gave me a lot of suggestions on follow-up preparation and development when I had not experienced several interviews. I also want to thank the two people who have actively followed up

CBU

Side (46 2.20 min)

  1. Project related introduction, not too much reference will not write ~

  2. Why is String immutable, and for what reason

  3. String s1=” ABC “, how is the data stored in Java after the statement is executed

  4. String s1 = “ABC “, String s2 = “ab”+”c”, create several objects

  5. A brief introduction to HashMap and ConcurrentHashMap (hash, data structures, capacity expansion, thread safety, version comparisons)

  6. Red black tree, B+ tree

  7. How can multithreading protect shared memory between threads

  8. Java memory model

  9. How does Volitail guarantee visibility

  10. Know which design patterns

  11. Comparison of template method and proxy mode and application scenarios

  12. Have you tried JVM tuning and memory dump

Second interview (28 min) 3.18

  1. Several ways to implement multithreading are introduced

  2. The difference between run-time exceptions and normal exceptions

  3. A HashMap, ConcurrentHashMap

  4. Introduce HTTP and HTTPS

  5. UDP and TCP are introduced

  6. Where polymorphism is represented

  7. The principle of heap sort and merge

  8. Agent mode, chatted about JDK agent source code

  9. Project related

  10. Read what project source code

  11. What kind of technical books are you reading recently? We talked about redis in the book

  12. One side of the answer to the most bad questions, now how to solve.

BU the written test

N strings of the form “stringA, stringB”, indicating that there is some kind of relationship between the two strings, which can be passed, and finally m questions “stringA? StringB “to determine whether stringA is related to stringB. In other words, if A is related to B, and B is related to C, then A is related to C.

Four sides 4.2 (36min)

  1. Project related

  2. Where do you think the implementation is most complex

  3. How to realize zhihu’s concern list at the database level

  4. 30 minutes for the above three questions, and then we’ll talk about life

Five faces 4.7 (22min)

  1. Redis I/O model, data structure
  2. Comparison of synchronized and lock
  3. Thread state, switching between states, life cycle
  4. The difference between waiting and blocking
  5. How does TCP ensure reliable transmission of messages
  6. Indexing mechanisms for databases.
  7. Most left matching, combined with B+ tree implementation and query mechanism chat
  8. Cache avalanche
  9. Three traffic limiting algorithms

Cross surface 4.8 (30min)

  1. Java memory region partitioning

  2. ConcurrentHashmap capacity

  3. CAS

  4. Sensitive word filtering, time and space complexity (dictionary tree ->AC automata)

  5. Process of communication

  6. The difference between pipes and redirects

  7. The OSI model

  8. TCP and UDP are different

  9. MySQL query optimizer optimization process (only covering route selection and cost estimation)

And then there’s the HR face. And hung up… While writing the second copy of this article, I found that the questions were really simple compared to other interviews, although it didn’t work out in the end, I would like to thank all the interviewers at CBU for sacrificing their time to interview me for the nyoo. Thank you for your advice and encouragement ~ it’s not much better than my autistic face time ~ (not for bytes, just because I hate QAQ)

CRO

Side 4.17 (1h10min)

  1. What aspects can we consider to ensure a normal and smooth transaction during the Double Eleven

  2. Common current limiting schemes

  3. The approximate design idea that pays treasure to pay

  4. Tomcat default number of connections

  5. How does Tomcat break the parental delegation model

  6. Class loaders and class loading procedures

  7. How to implement a ClassLoader yourself

  8. Have you ever encountered a stack overflow, under what circumstances, and in what memory area

  9. When does GC occur

  10. How do I trigger GC manually

  11. Principle of GC algorithm

  12. Fast scheduling time complexity, principle, optimization

  13. Thread state

  14. How to remove the high CPU usage

  15. What protocol does Tomcat use to provide external services after it is started

  16. SSL Handshake Process

  17. What are the possible risks of HTTP/HTTPS from a security perspective

  18. What are XSS and CSRF

  19. What are the risks of cookies

  20. How about English

  21. What courses do I usually take? Testing, requirements, project management, architecture design

  22. What are the common test methods

  23. Automated testing, CI/CD

  24. Implementation of database isolation mechanism

Second face 4.21 (45min)

  1. Got those offers

  2. If you have used Linux, how to check the thread condition? How can I view files in reverse order according to the latest modification time

  3. Why rewrite hashCode

  4. Hash conflict resolution

  5. Sorting a binary, the process of sorting (I don’t know why I suddenly threw a simple question)

  6. Square root of 5 (binary/Newton iteration)

  7. Fibonacci NTH term (iterative/matrix quick powers)

  8. 2 large files, parallel line (for each line summary, build dictionary tree. Abstract The same character by character comparison, talking about the specific time/space complexity, a total of 15 minutes.)

  9. MySQL engine is a common engine for MySQL. MyISAM and InnoDB index structure, table structure and log

  10. ask

Three sides 4.23 (1h14min)

P.s: Most closed side, no one QAQ

  1. Snowflake algorithm (from the project chat database split chat), how to query
  2. Anti-theft scheme

It took a total of 30min for the above two questions plus some questions of the project. In the next 40min, I was completely closed and only asked one question: how to sort 1T files with 16G memory of 8 cores per machine? Including the following minor issues:

  • IO way
  • The number of threads
  • How are threads scheduled
  • Tasks per thread
  • The specific process of merge sort
  • The next flow after the first merge
  • Multi-machine large file sorting

I was naive to think that this kind of questions about the process of multi-way merge is almost enough, but when I met the interviewer detailed to the pseudo-code level of the question directly fried… Fortunately, the interviewer showed mercy and reluctantly let me pass…