Ali+Toutiao+Baidu+Jingdong+Meituan, the premiere of 2020 Golden Nine Silver Ten interview questions, let’s take a look at how you are preparing

Preface

On September 18, 2020, it is now a good season for "Golden Nine and Silver Ten" to change jobs and raise wages. I wonder if you are satisfied with the status quo, or are you ready to go? Recently, I am collecting and sorting out interview questions from Dachang. Come here! I will share with you! Come on!

This article has been included in my GitHub project: https://gitee.com/biwangsheng/personal.git

At the end of the article~Share the answer analysis~

01 Ali middleware (four sides, Java post)

 

1.1 Java middleware side

Technical inspection scope

The focus is on Java thread locks: the underlying implementation of synchronized and ReentrantLock related underlying implementations of thread pools and common parameter data structures have basically been asked again: linked lists, queues and other Java memory models: frequently asked JVM generation models, and JDK1. After 8 the difference, I finally asked about the JVM-related tuning parameters for the implementation of distributed locks.

One topic

  • Self introduction
  • What kind of technology are you good at?
  • What are the lock classes in java? (Optimistic lock & pessimistic lock, reentrant lock & Synchronize, etc.).
  • The basic principles and general implementation of more important data structures, such as linked lists, queues, and stacks
  • Use of common classes under the JUC. In-depth investigation of Threadpool; use of blockingQueue
  • Java memory generation model, GC algorithm, common startup parameters of JVM; CMS algorithm process.
  • What is the use of the Volatile keyword (including the underlying principles)
  • Thread pool tuning strategy
  • How is Spring Cloud service registration and discovery designed?
  • How to realize the global id of the distributed system
  • The distributed lock scheme is good for redis and zookeeper. If it is a cluster deployment, the performance is better under high concurrency.

1.2 Two sides of Java middleware

Scope of technical two-sided inspection:

I asked about the technical implementation details related to the project. Database related: index, underlying implementation of index, mysql related row lock, table lock and other redis related technologies: architecture design, data consistency problem container: container design principle and other technologies

Two-sided question:

  • Participate in the project, choose one, what is the technical difficulty?
  • Collections.sort underlying sorting method
  • The principle design pattern and reconstruction of load balancing, talk about your understanding of reconstruction
  • What are the mature solutions for redis-related clusters?
  • Talk about the consistent hash algorithm (redis)?
  • Database index, the characteristics of B+ tree and the process of building a tree
  • Mysql related row locks, table locks; optimistic locks, pessimistic locks
  • Talk about the use of multithreading and concurrent tools
  • Talk about the architecture and components of redis
  • Redis data consistency problem (distributed multi-node environment & single machine environment)
  • Docker container

1.3 Three sides of Java middleware

Scope of three-sided technical investigation:

Mainly talked about the implementation of high concurrency and middleware: redis, rocketmq, kafka, etc. The architecture design ideas and finally asked how to improve the technology in ordinary times

Three-sided question

  • In the case of high concurrency, how does the system support a large number of requests?
  • Then the above question extends to middleware, design ideas and applicable scenarios such as kafka, redis, rocketmq, mycat, etc.
  • Which technology sites have been on recently; read those books recently.
  • How to overcome the biggest challenges in work and life?
  • What are your plans for the future

1.4 Four sides of Java middleware

Finally, you know, the main thing is that HR goes through the process, mainly asking about future career plans.

02 Headline Java backend 3 sides

 

2.1 The headline side

  • Talk about jvm runtime database area
  • Tell me about the garbage collection algorithm you know
  • jvm memory model jmm
  • The difference between memory leak and memory overflow
  • What is the difference between select and epool? What is the underlying data structure?
  • What are the advantages of mysql database default storage engine
  • The method of optimizing the database, from sql to cache to cpu to operating system, know how much
  • Under what circumstances do sub-tables and under what circumstances do sub-databases
  • The difference between linkedList and arrayList applicable scenarios
  • How the array list is expanded
  • What does the volatile keyword do? Java memory model?
  • Implementation of java lock, fair lock and unfair lock
  • Pessimistic locking and optimistic locking, application cases, how to implement in mysql, implement in java

2.2 Two sides of the headline

  • Java memory allocation strategy?
  • How to allocate memory when multiple threads request memory at the same time?
  • What data structures are used at the bottom of Redis?
  • What have you done with Redis set?
  • What problems did you encounter during the use of Redis?
  • Have you ever built a Redis cluster?
  • How to analyze "slow query" logs for SQL/index optimization?
  • Explain the MySQL index structure? (B+ tree)
  • What is the applicability of MySQL Hash index? Give an example?

2.3 Three sides of headlines

  • How to ensure that the database and the redis cache are consistent with Redis's concurrent competition problem?
  • how to solve this problem?
  • Do you know the CAS scheme of Redis transactions?
  • How to ensure high concurrency and high availability of Redis?
  • Redis's master-slave replication principle, and Redis's sentinel principle?
  • If you are asked to write a message queue, how to design the architecture? Tell me about your thoughts.
  • How to achieve master-slave synchronization of MySQL database?
  • How to design the spike module, how to pressure test, the means to resist pressure

03 Today's headlines three aspects of Java back-end development

 

3.1 One side

  • Which ones have you used under the concurrent package?
  • Countdownlatch function implementation
  • The difference between synchronized and lock, the difference between reentrant lock thread and runnable
  • AtomicInteger implementation principle (CAS spin)
  • The difference between java concurrent sleep and wait, notify and notifyAll
  • How to achieve efficient synchronization of linked lists
  • What are the locking methods in java (synchronized, ReentrantLock, shared lock, read-write lock, etc.)
  • Design patterns (factory pattern, singleton pattern (several cases), adapter pattern, decorator pattern)
  • maven dependency tree, maven dependency transmission, circular dependency

3.2 Two sides

  • The difference between synchronized and reentrantLock, what are the locks used when synchronized is used in fast code, method, and static method?
  • Introduce spring's IOC and AOP, how to implement (classloader, dynamic proxy) JVM memory layout and garbage collection principle and process respectively
  • Tell me about the garbage collection process of the CMS garbage collector and the shortcomings of CMS
  • How does redis deal with the inconsistent OSGi mechanism caused by distributed server concurrency? The bean loading mechanism in spring, the specific steps of bean generation, and the way of ioc injection. When is spring created-which event does applicationContextlistener listen for?
  • Introduce the principle of ConcurrentHashMap, what kind of lock is used, is it possible to increase the segment?
  • Explain mysql index, b tree, why not balance binary tree, red-black tree
  • How to synchronize the configuration of Zookeeper

3.3 Three sides

  • Java thread pool ThreadPoolEcecutor parameters, basic parameters, usage scenarios
  • MySQL's ACID talk about it, extended to the isolation level
  • The realization principle of dubbo, talk about the main points of RPC
  • GC pause reason, how to reduce the pause?
  • How to tune the JVM and how to adjust the parameters?
  • How to use tools to analyze the state of jvm (visualVM looks at the allocation of objects in the heap, references between objects, whether there is a memory leak, jstack looks at thread status, whether it is deadlocked, etc.)
  • Describe the consistent hash algorithm
  • How to avoid distributed avalanche scenarios?
  • Talk about the message queue again

04 Tik Tok Java Three Sides

2020 Autumn Recruitment New Face Classic: Ali + Headline + Douyin + Baidu + Ant + Jingdong + Meituan

 

4.1 One side:

  • Hashmap, how to expand, how to deal with data conflicts?
  • How to efficiently implement data migration?
  • How to realize Linux shared memory, probably talk about it.
  • Socket network programming, talk about the difference between TCP's three-way handshake and four waved synchronous IO and asynchronous IO?
  • Java GC mechanism? What are the GC Roots?
  • Let’s talk about the red-black tree. Five features, insertion and deletion operations, time complexity?
  • The time complexity of fast sorting, the worst case, the best case, the time complexity of heap sorting, and the complexity of building a heap

4.2 Two sides:

  • Introduce yourself, mainly talk about what you have done and what you are good at
  • What do you know about design patterns?
  • How does AtomicInteger realize atomic modification?
  • What is the difference between ConcurrentHashMap in Java7 and Java8?
  • Why is Java 8 concurrency more efficient? When to use HashMap and when to use ConcurrentHashMap?
  • Redis data structure?
  • Redis data elimination mechanism?

4.3 Three sides (about fifty minutes):

  • The principle of mysql to achieve transaction (MVCC)
  • How is MySQL data master-slave synchronization achieved?
  • The realization of MySQL index, innodb index, how to implement b+ tree index, why use b+ tree as index node, how much data a node stores, how to specify the size, and the corresponding disk page.
  • If Redis has 100 million keys, will using the keys command affect online services?
  • Redis persistence methods, aod and rdb, how to implement it, append logs and backup files, do you know the underlying implementation principle?
  • What is the biggest difficulty encountered? How to overcome?
  • What is the future plan?
  • What do you want to ask me?

05 Baidu three sides

 

5.1 Baidu side

  • Self introduction
  • Polymorphism in Java
  • Why rewrite hashcode and equals at the same time
  • The principle of Hashmap
  • How Hashmap becomes thread safe, the advantages and disadvantages of each method
  • Garbage collection mechanism
  • Tell me about the parameters of Jvm you know
  • Let’s talk about design patterns
  • Hand tear a singleton pattern
  • Hand tearing algorithm: Reverse singly linked list
  • Hand tearing algorithm: to achieve a data structure similar to Weibo's substructure, input a series of parent-child relationships, and output a parent-child structure diagram similar to Weibo comments
  • Handwriting java multithreading
  • Handwritten java soeket programming, server and client
  • Hand tearing algorithm: Climb the stairs and write the state transition equation
  • Puzzle: When does the hour and minute hands coincide

5.2 Baidu two sides (on-site)

  • Self introduction
  • Project Introduction
  • How does the server load balance, what algorithms are there, which is better, the principle of consistent hashing, and how to avoid DDOS attack requests from hitting a few machines.
  • The three-way handshake and four waved hands in a TCP connection. What is the function of the last ack of the four waved hands, why is time wait, and why is 2msl.
  • How to implement database backup and recovery, how to do master-slave replication, when will there be data inconsistencies, and how to solve them.
  • Linux view processes with high cpu usage
  • Hand tear algorithm: Given a digital triangle, find the smallest path sum from the top to the bottom. Each step can be moved to the adjacent number in the lower row.
  • Then continue to expand on this issue
  • Find the shortest path
  • Find all paths recursively
  • Design patterns talk about familiar
  • Will the design pattern be abused
  • Why should multithreaded condition variables be in the while body
  • What setbacks did you encounter, how to deal with and deal with it

5.3 Three sides of Baidu (on-site)

  • Self introduction
  • Project Introduction
  • Features of Redis
  • How to do Redis persistence, what is the difference between AOF and RDB, and what are the advantages and disadvantages.
  • Redis uses sentinel deployment to have any problems, I said that if you need to expand, you still have to cluster deployment.
  • Talk about the JVM memory model, which areas are there, and what are they doing
  • Talk about the gc algorithm, let's talk about the generational recovery
  • Let’s talk about the MySQL engine. What is the difference and usage scenarios?
  • Do you understand distributed transactions?
  • What are the mechanisms of anti-reptiles?

06 Ant Middleware Team Interview Questions

 

6.1 One side of ant middleware:

  • Self introduction
  • What are the JVM garbage collection algorithms and garbage collectors, and what algorithms are used by the latest JDK.
  • The recycling mechanism of the young and old generations.
  • Talk about the difference between ArrayList and linkedlist, and how to expand ArrayList and HashMap.
  • Changes after Concurrenthashmap1.8.
  • Do you understand multithreading in Java, as well as the growth strategy and rejection strategy of the thread pool.
  • Do you understand Tomcat's class loader?
  • Spring's ioc and aop, the basic architecture of Springmvc, and the request process.
  • What is the difference between HTTP protocol and Tcp, the difference between http1.0 and 2.0.
  • Java network programming, talk about the implementation of NIO, the difference with BIO, and introduce the commonly used NIO framework.
  • When will the index fail to become a full table scan
  • Introduce distributed paxos and raft algorithms

6.2 Two sides of ant middleware

  • How do you use concurrency in your project.
  • Use scenarios of message queues, talk about Kafka.
  • You said you understand distributed services, so how do you understand distributed services.
  • The difference between Dubbo and Spring Clound, and usage scenarios.
  • Talk about the implementation principle of docker and the difference with JVM.
  • Application scenarios of MongoDB, Redis and Memcached, their respective advantages
  • Does MongoDB have transactions
  • Redis talk about the underlying principle of sorted set
  • Talk about why Netty has high concurrency and what are the related core components

6.3 Three sides of ant middleware

  • Completely draw a distributed cluster deployment diagram, from load balancing to back-end database clusters.
  • Distributed lock scheme, which is better, Redis or Zookeeper, if it is a cluster deployment, which performance is better under high concurrency.
  • How to realize the global id of the distributed system.
  • How do you solve the problem of tens of thousands of databases becoming hundreds of millions?
  • What causes common server avalanches and how to prevent them.
  • How to achieve remote disaster tolerance
  • What are the commonly used high-concurrency technical solutions and the corresponding solutions.

07 Jingdong 4 sides (Java R&D)

 

7.1 One side (basic side: about 1 hour)

  • Introduce yourself, mainly talk about what you have done and what you are good at
  • Difference between springmvc and spring-boot
  • @Autowired implementation principle
  • What is the default scope of Bean? Other scope of action?
  • What is the function of the index? What are the main index structures in MySQL? Compare hash index and B+ tree index?
  • The principle of Java thread pool? What are the thread pools? What are the thread pool types of the thread pool factory and what are the thread pool parameters?
  • Hashmap principle, which method is used to deal with hash conflicts?
  • Do you know any way to deal with hash collisions?
  • Java GC mechanism? What are the GC Roots?
  • How does Java perform garbage collection? Who will enter the old age? What are the garbage collection algorithms? Why does the new generation use replication algorithms?
  • The time complexity of HashMap? How to resolve Hash conflict in HashMap? What is the upper level structure of the linked list? What has changed in HashMap in Java 8? Red-black trees need to be compared in size to be inserted. What is the basis for comparison? Other Hash conflict resolution methods?
  • The difference between hash and B+ tree? What scenarios are they applied to? Which is better?
  • There is a data security in the project, the difference between aes and md5? Detailed point

7.2 Two sides (more databases are asked)

  • Self introduction
  • Why is MyISAM query performance good?
  • Transaction characteristics (acid)
  • Isolation level
  • Common optimization steps for slow SQL queries?
  • Talk about optimistic locking, pessimistic locking (select for update), and write SQL implementation
  • The three-way handshake and four-time wave of TCP protocol?
  • Which rpc frameworks have been used
  • How to realize the database connection pool
  • The life cycle of a Java web filter

7.3 Three sides (comprehensive side; about one hour)

  • Self introduction.
  • What is the difference between ConcurrentHashMap in Java7 and Java8? Why is Java 8 concurrency more efficient? When to use HashMap and when to use ConcurrentHashMap?
  • What is the mechanism of locking?
  • ThreadLocal? Application scenario?
  • The design idea and sequence of the database horizontal segmentation and vertical segmentation
  • How Redis resolves key conflicts
  • What is the difference between soa and microservices?
  • What technical adjustments will be involved in the evolution of a single-machine system to a distributed system? Please describe in detail from the front load to the back end.
  • Design a spike system?

7.4 Four sides (HR side)

  • What are your own greatest strengths and weaknesses
  • What kind of challenges did you meet and how did you overcome them?
  • When you encounter a problem that cannot be solved by technology, how do you deal with it?
  • Your hobbies?
  • What is your future career plan?

08 Meituan Java Advanced Development 3 Sides

 

8.1 Meituan side

  • Self introduction
  • Project Introduction
  • Introduction to Redis
  • Know the redis source code
  • Know redis cluster
  • The principle of Hashmap, how to shift the back-end data structure when adding and deleting
  • Why is the hashmap capacity a power of 2
  • Source code of hashset
  • Object class methods you know
  • hashcode和equals
  • Have you rewritten hashcode and equals? What should you pay attention to?
  • Suppose there is a student class with a student ID and name. When I rewrite the hashcode method, only the student ID is involved in the calculation. What will happen?
  • Put a student object into the set, then change the student ID of the student object, and then put it in. Can it be put into the set? And tell why
  • Redis persistence? What are the ways and the principle?
  • Talk about stable sorting algorithms and unstable sorting algorithms
  • Talk about the idea of ​​quick sort

8.2 Two Sides of Meituan

  • Self introduction
  • Talk about the acid of the data
  • What is consistency
  • What is isolation
  • Mysql isolation level
  • How each isolation level is resolved
  • Mysql needs nextkey lock, how to write the statement
  • Java memory model, garbage collection
  • Thread pool parameters
  • Explain each parameter
  • Then the interviewer set up each parameter and gave it a thread to describe the complete thread pool execution process
  • What is the difference between Nio and IO
  • The difference between Nio and aio
  • How to implement Spring's aop
  • What are the implementation methods of Spring's aop
  • The realization and difference of dynamic proxy
  • What about Linux
  • How to check system load
  • If the parameter of Cpu load is 4, describe the current situation of the system
  • Linux, command to find the largest file on disk
  • Linux, how to view system log files
  • Hand tearing algorithm: Leetcode original question 22, Generate Parentheses, given n pairs of parentheses, please-write a function to generate a new combination of parentheses and return all the combined results.

8.3 Three sides of Meituan (site)

Three sides didn’t ask much about technology, and asked a lot of technical management questions.

  • Self introduction
  • Project Introduction
  • How to manage project members
  • When disagreements, how to communicate and persuade development members, and give an example
  • How to ensure the progress of the project
  • The principle of database index
  • Non-clustered index and clustered index
  • Notes on using the index
  • Joint index
  • Explain the leftmost matching principle from the bottom
  • Does Mysql optimize the joint index? Will the order be adjusted automatically? Which version is optimized?
  • Redis application
  • Redis persistence method and principle
  • Technology selection, a new technology and a stable old technology, how would you choose, what are the considerations for selection
  • The three blogs of the Meituan Dianping technical team that impressed you most
  • What new technology are you learning recently
  • How did you get in touch with a new technology
  • Which books will I read
  • How to choose the book to read

to sum up:

The above are the 7 interview questions compiled by "staying up all night" and "vomiting blood": Ali + Toutiao + Douyin + Baidu + Ant + Jingdong + Meituan. In fact, we can find that many knowledge points must be asked in the interview. I wish everyone can find a satisfactory job! Come on!

 

All the above interview questions and detailed answer analysis in this article have been collected in my GitHub project: https://gitee.com/biwangsheng/personal.git [2020 first-line Internet manufacturers Java core interview question bank]: Java basics, exceptions , Collection, concurrent programming, JVM, Spring family bucket, MyBatis, Redis, database, middleware MQ, Dubbo, Linux, Tomcat, ZooKeeper, Netty, etc..., and will continue to update...

Another addition to the interview resolve, as well as a full set of advanced Java architecture pdf shown below , need to learn from a friend can direct private letter I [pdf] - immediately reply share - free to download!

 

 

Guess you like

Origin blog.csdn.net/weixin_42864905/article/details/108683364