background

  • Undergraduate double non + terminal flow 985 slag master
  • Algorithm: No ACM/OI experience, Leetcode 500 + (weekly average top 200)
  • Intern: no

The delivery

  • Tencent WXG (4 rounds of technology + 1 round of HR + 1 round of technology (HC is not enough to transfer to another WXG group)
  • Tencent CSIG (3 rounds of technology + 1 round of HR) OC
  • Tencent IEG (2 rounds of technology) rejected the second round of interview (technology stack mismatch)
  • Meituan arrived at the store (3.12, the first written test: 0.45 + 1 + 0.36 + 0.9 + 0.55 2 rounds of technology)
  • Ctrip (written test: 1 + 1 + 0.7
  • Baidu (written test: 1 + 0.7 + 1) refused to interview (Beijing seems not to allow wuhan locals into Beijing, dry up)
  • Amazon rejects interviews (ditto)
  • Jingdong (once passed, ready to reject, for the same reason as above)
  • China Merchants Bank credit card Center (written test 1 + 1) written test hang (2 algorithm questions Ak hang, feel very card school (985 pieces of master brush))
  • Microsoft (written test 0 + 0 + 0) written test failed (with ant Financial interview conflict, did not do)
  • Google (written test kickstart19 years all dozen, best ranking top 200, invited to A day with Google interview 1 round of technology) (passed, due to the epidemic canceled this year’s internship)
  • Netease Cloud Music (written test 1 + 1 + 0.6 + 1 2 rounds of technology + HR) waiting for the results
  • Huawei cloud (1 + 0.75 + 0.7) is waiting for the interview
  • Mogujie (2 rounds of technology + 1 round of HR) OC
  • Ali news in Taiwan (advance batch 2 rounds of technology) hang
  • Ali middleware (advance batch 2 rounds of technology)
  • Ant Financial Middleware (March 20, the first written test: 0.8 + 1, 2 rounds of technology + 1 round of HR) waiting for the results (the rating may not be high or there is no crossover)
  • Bytedance (written test: 1 + 1 + 0.25 + 1) waiting for the second interview
  • Webank (written test: 1 + 1 + 1
  • Didi Chuxing (2 rounds of technical aspects) No follow-up (the internship duration is not matched, requiring a long internship)
  • Douyu (written test: 0.8 + 2 rounds of technique) awaits the result
  • Shopee (written test 1 + 0.6 + 0.3) no following
  • Ape Counseling (no follow-up)
  • Tiger teeth (internal push no follow-up)
  • Chianxin (no follow-up in internal push)
  • Millet (internal push without the following)
  • Paypal (resume hanging)
  • Kuaishou (resume hanging)

Face the

Tencent ieg

(a)
  1. Epoll ET/LT differences (source code level)
  2. TCP keywords (such as reuseport and reuseAddress)
  3. Nginx does not understand (answered accept lock)
  4. Redis correlation (why skip lists don’t use red black trees)
  5. C++ memory allocation, virtual functions (I’m Java, basically can’t, but it doesn’t matter)
  6. The memory structure of the process (I answered from the JVM level, but from the Linux perspective, no, but it doesn’t matter)
  7. C++ memory allocation (pooledbytebuffer Jemalloc, Netty)
  8. Reentrant lock, spin lock, pessimistic lock, Optimistic lock, CAS (from Java perspective and database lock answer, the interviewer wants me to answer from Linux)
(ii) surface

Technical stack mismatch, refused interview

Tencent csig

(a)
  1. Netty’s advantages over NIO (Master/slave Reactor model +Mpsc queue (core idea is asynchronous serial lock-free) + various components)
  2. What optimizations did Netty make (empty polling bug + rewriting keyset)
  3. Epoll source code, LT and ET difference (need to put back to rdList)
  4. How tomcat/Jetty differs from Netty in its read/write operations on interest sets.
  5. The impact of thread context switching on Netty threads
  6. Implementation of singleton pattern (enumeration pattern)
  7. Netty memory allocation principle (pooledByteBuffer source code implementation)(Jemalloc algorithm Java implementation: FastThreadLocal(ensure thread safety) + partner allocation algorithm implementation (complete binary tree) + bitmap)
  8. Netty Implements RPC
  9. Eureka’s Principle (AP + Preservation mechanism of CAP theory)
  10. Pulled raft algorithm from Redis cluster
  11. Automatic assembly of Spring IOC/AOP/declarative transactions/SpringBoot
(ii) surface
  1. The entire flow of TCP three times, from the UNIX network programming point of view to answer (Bind(), listen(), accept and so on, pull a half of the connection queue)
  2. Disruptor framework why use disruptor framework in your project (primarily to facilitate building a consumer chain for decryption purposes, the interviewer questioned)
  3. Distributed ID generation algorithm (Snowflake algorithm, implementation reference Baidu UUID -generator, ask why to refer to baidu open source this, what advantages, have you made a comparison (no))
  4. Scenario Problem 1: In the IM algorithm implemented by wechat, increasing distributed ID algorithm is needed to ensure the sequential delivery of messages. In a distributed environment, if the ID carried by each user’s message is guaranteed to increase in trend (not at all)
  5. Scenario question 2: Briefly talk about baidu search, input a few keywords, and how the recommendation is implemented and sorted (I answered that regardless of the recommendation system, use trie tree + Redis sortedset).
(three)

Just have a chat

(Hr)

Chat casually (until further notice)

Netease Cloud Music

(a)
  1. Self introduction + project
  2. Thread pool related (answer deeper: FutureTask + Worker class (state -1 is useful))
  3. Safety of Java threads (reorder + visibility + atomicity, as deep as possible)
  4. How is redis distributed lock correlation applied in projects
  5. Mysql, clustered and unclustered indexes, %like%, MaysQL transactions, default levels, gap locks, how composite indexes are represented in B+ trees
  6. Hand tearing algorithm, find top100 (quicksort slightly changed)
(ii) surface
  1. In UNIX network programming, how can the main thread pass fd to slave thread in case of thread pool?
  2. How to implement Redis network model (EPOLL LT mode)+ memory allocation algorithm (Jemalloc) + LRU
  3. Chat about the understanding of netease cloud music
(Hr)

Just have a chat

Meituan to the store (seriously suspected by KPI, obviously the written test so good T. T)

(One side)(18 minutes)
  1. Microservices Architecture
  2. Java locks
  3. Implement an RPC framework yourself
(Second interview)(15 minutes)
  1. Tell me about the project. No more

jingdong

(a)
  1. Chat program
  2. Java thread security, various locks, the difference between Syn and reentrant locks (source level)
  3. Automatic assembly of SpringBott
  4. Spring design patterns (singleton, project, Proxy, observer)
  5. Compare JDK dynamic proxies with Cglib dynamic proxies
  6. Default level of bean (@scope annotation, default is single instance, can be changed to multi-instance)
  7. Algorithm problem
Given a time, design an algorithm to determine which day of the week it corresponds to. Enter three integers: day, month, and year, indicating the day, month, and year respectively. The return result must be one of these values {"Sunday"."Monday"."Tuesday"."Wednesday"."Thursday"."Friday"."Saturday"}. (Wednesday, 2020.1.1)Copy the code

byte

(a)
  1. Chat program
  2. Principles of Redis (Data structure, Persistence (RDB + AOF), Master-slave communication (RAFT protocol), difference between cluster and Sentinel mode)
  3. Database indexes (B+ tree indexes, clustered vs. unclustered, combined indexes (left-most matching))
  4. Database transactions (isolation level, various read issues, InnoDB default isolation level)
  5. Algorithm problem
Sort the KTH largest node of the binary treeCopy the code

bettas

(a)
  1. Chat program
  2. Talk about JVM(garbage collection, memory allocation, has it actually been tuned (no))
  3. Chat thread pool (with common 3 thread pool principle, parameters + process + source code)
  4. Talking about databases (isolation level, transactional)
  5. I’m going to write a random binary tree traversal
(ii) surface
  1. Chat program
  2. Discuss the principle of TCP in UNIX network programming
  3. Would you like to go + chat

Ali news center

(a)
  1. Select /poll/epoll understand, ET/LT source difference
  2. TCP protocol, setnoday configuration, reset packet
  3. Understanding copyonwrite in JUC
  4. Reentrant lock source code (fair and unfair mode), in the wake up process to do what optimization
  5. Netty threading model, the difference between write() and channel.write()
(ii) surface
  1. How to optimize the whole project to millions, even hundreds of millions of levels, and then cool

other

There are other face classics, in fact, with the above knowledge about the same, plus their previous record, forget a lot, we will see

experience

  1. Make sure you vote early, or you’ll have plenty to wait for
  2. It is not enough to have a solid foundation, but also to have project support (ask the foundation on the basis of the project). I can usually pass the first and second interviews, because THERE is no internship experience
  3. It is recommended to forget a round after a summary (do not care about the result), because it is really uncomfortable, you have a good attitude
  4. As far as possible the shotgun
  5. Do more projects. If you don’t have one, go to Github

Project proposal

My own words have no internship experience and are basically self-taught. My own words are more interested in Netty framework. Here are some project directions for you to refer to based on Netty

  • Implement the RPC framework based on Netty, implement raft algorithm on this basis, and then proceed to implement a simple KV storage on this basis.
  • Based on the book How Tomcat Works, I used NIO and Netty to implement a simple Http server
  • Using EPOLL/POLL/SELECT three network programming modes, to achieve a C language version of the simple Netty, and on this basis to achieve Http protocol parsing, and use Webbench pressure test
  • There is a lot of information on the web. If you are not satisfied, you can read blade(github.com/lets-blade/…). Source code for this open source project