178 latest Ali interview questions and analysis summary: Taobao + Ant + Alipay + rookie

Every year's Double 11 is a rehearsal site for Ali's new technology, and it is also an annual show for Ali technical people.

As a typical representative of domestic Internet technology, Alibaba's technology has always attracted everyone's attention. Being able to work in Alibaba is the goal and dream of many developers. In order to help developers improve their interview skills and efficiently pass the interviews of first-line Internet companies, we interviewed many senior Alibaba technical experts and Alibaba senior Java candidates to refine Summarize the real interview questions, and give it to everyone as a whole.

See how much you can answer correctly. If you can answer 70% of the questions, go to Alibaba and various Internet companies to try your skills.

This article is recommended for everyone to collect and reserve~

[Alipay, Tmall, Ant interview questions]

Covers: open source, Java collection, JVM, NIO, Dubbo, spike system, high concurrency, distributed, lock, redis, MySQL, Linux, hashMap, middleware, etc.

  1. Self-introduction and work experience
  2. What are the advantages of technology (Dingding)
  3. Which middleware have been used.
  4. Have not done a workflow engine.
  5. The underlying implementation of NIO.
  6. JVM basics (must ask), JVM GC principle, how to reclaim memory by JVM.
  7. Principle of Thread Pool (Tmall, Ant)
  8. Lock mechanism up/down (Tmall, Ant)
  9. Dubbo's principle, serialization related issues.
  10. How does Dubbo make multiple calls concurrently with one link?
  11. Distributed transaction consistency.
  12. Consider from the system level, from which latitudes are distributed considerations (Tmall)
  13. How to realize WeChat red envelopes.
  14. Mass data analysis.
  15. The difference between API interface and SDI interface (API is an interface provided to others).
  16. How to realize the bottom layer of Hadoop (Tmall)
  17. threadLocal, thread pool, hashMap/hashTable/coccurentHashMap, etc. (Tmall)
  18. Design of spike system (Tmall)
  19. Virtual machine, IO related knowledge points (Tmall)
  20. Linux commands (Tmall)
  21. An integer array, given a number, find the sum of two numbers in the array equal to this number, and print it out. The time complexity I wrote is high and requires O(n). (Tmall)
  22. n integers, find the maximum sum of m consecutive numbers. (Tmall)
  23. Pay more attention to open source technology (Ant Financial Shanghai)
  24. 1000 threads are running at the same time, how to prevent not getting stuck (air trip)
  25. Parallel concurrent consumption problem (air travel)
  26. How to deal with hotspots and data with high concurrency (Ant Financial)
  27. How to get a port available on a local server
  28. Flow control related issues (Ant Financial)
  29. What is the TPS of the database and whether it has been tested (Tmall)
  30. Principles of Database Locking (Ant Financial Service)
  31. Distributed lock, redis cache, spring aop, system architecture diagram, characteristics of MySQL (information platform)
  32. What are the solutions to cache breakdown (Tmall)
  33. Java how to mine the relevant principles of the collector (fortune)
  34. What are the Java collections, and what are their characteristics (information platform)
  35. Scenario, pay 100,000 people at the same time, how to design a concurrency plan to ensure that it is all sent within 1 minute. For example, a similar scenario will be proposed (information platform)

[Alibaba interview questions]

Covers: consistent hashing algorithm, CAP, session, thread pool, reflection mechanism, http protocol, Java virtual machine, distributed system, TCP/IP, OSI, stack, heap, distributed system design, etc.

  1. What are the three parts of the Java event mechanism? Introduce them separately.
  2. Why use thread pool?
  3. What are the functions of the thread pool?
  4. What are the several common thread pools and their respective usage scenarios?
  5. What kinds of work queues are available in thread pools?
  6. How to understand unbounded queue and bounded queue?
  7. Several important parameters and process descriptions in the thread pool.
  8. What is the reflection mechanism?
  9. Talk about the role of reflection mechanism.
  10. Will the reflection mechanism have performance problems?
  11. How do you understand the http protocol?
  12. Talk about the workflow of the http protocol.
  13. What are the http request submission methods?
  14. What state does the 200,302,403,404,500,503 in http represent?
  15. What is the difference between http get and post?
  16. How do you understand cookie and session, and what are the differences?
  17. What is web caching? What are the advantages?
  18. What is https and how does it work?
  19. What is an http proxy server and what is it for?
  20. What is a virtual host and its implementation principle?
  21. What is the Java Virtual Machine and why should I use it?
  22. Talk about the life cycle and architecture of the Java virtual machine.
  23. Talk about the Java memory area.
  24. What is a distributed system?
  25. What aspects would you consider for distributed systems?
  26. Why is the TCP/IP protocol unreliable?
  27. What are the seven-layer models of OSI? Which four-layer model is TCP/IP?
  28. Let me talk about the three-way handshake and four-way wave process of the TCP protocol.
  29. Why is TCP a three-way handshake for establishing a connection, but a four-way handshake for closing a connection? Why can't I connect with two handshake?
  30. Why does the TCP TIME_WAIT state need to wait for 2MSL before returning to the CLOSED state?
  31. What are DoS, DDoS, DRDoS attacks? How to defend?
  32. Describe the Java exception hierarchy.
  33. What are checked exceptions, unchecked exceptions, runtime exceptions? And give examples to illustrate.
  34. Will the finally block be executed?
  35. Under normal circumstances, when a return statement is encountered in a try block or a catch block, will the finally statement block be executed before or after the method returns?
  36. The execution order of try, catch, and finally block.
  37. In the Java virtual machine, what types of data can be divided into?
  38. How to understand stack and heap? What's in the heap? What is stored in the stack?
  39. Why distinguish between heap and stack? Isn't it possible to store data in the stack?
  40. In Java, what is the starting point of the stack, which is also the starting point of the program?
  41. Why not put the basic types in the pile?
  42. What about passing values ​​when passing parameters in Java? Or pass by reference?
  43. Is there a concept of pointers in Java?
  44. In Java, what parameter is used to set the stack size?
  45. How much space does an empty Object object occupy?
  46. What are the types of object reference types?
  47. Talk about the garbage collection algorithm.
  48. How to solve the problem of memory fragmentation?
  49. How to solve the problem of object creation and object recycling at the same time?
  50. Let me talk about memory generation and life cycle.
  51. Under what circumstances trigger garbage collection?
  52. How to choose a suitable garbage collection algorithm?
  53. What are the three garbage collectors for JVM?
  54. Is there a limit to the maximum heap size in JVM?
  55. How to tune the JVM? What are the methods?
  56. What parameters are used to set the heap size?
  57. Which garbage collector is preferred for throughput? Is response time a priority?
  58. How to understand the memory leak problem? What are the circumstances that can cause memory leaks? How to solve?
  59. From the perspective of distributed system deployment, what are the layers?
  60. How to solve the problem of data access in the business layer?
  61. In order to solve the burden of database server, how to do database distribution?
  62. What is the famous Byzantine generals problem?
  63. Talk about the CAP concept.
  64. How to understand strong consistency, monotonic consistency and eventual consistency?
  65. What strategies would you consider for distributed system design?
  66. What is the most common data distribution method?
  67. Talk about the consistent hash algorithm.
  68. What is paxos?
  69. What is the Lease mechanism?
  70. How to understand the main selection algorithm?

[Alibaba interview questions with answers]

1. What are the three major engines of mysql?

The commonly used engines of mysql are InnoDB, MyISAM, Memory, and the default is InnoDB

InnoDB: Disk tables, support transactions, support row-level locks, B+Tree index

ps: Advantages: Has good ACID characteristics. It is suitable for tables with high concurrency and more update operations. Need to use transaction table. Tables that require automatic disaster recovery.

Disadvantages: The reading and writing efficiency is relatively poor compared to MYISAM. The disk space occupied is relatively large.

The 4 major features of mysql + 4 isolation levels:

MyISAM: Disk table, does not support transactions, supports table-level locks, B+Tree index

ps: Advantages: small footprint and fast processing speed (relative to InnoDB)

Disadvantages: does not support transaction integrity and concurrency

MEMORY (Heap): memory table, does not support transactions, table-level locks, Hash index, does not support Blob, Text large types

ps: Advantages: fast speed, temporary data

Disadvantages: After the loss, when there is no or little negative impact on the project as a whole.

2. What is the hash algorithm of redis used?

Redis should use a consistent hash algorithm --- MurmurHash3 algorithm, which has the advantage of low collision rate. Google's improved version of cityhash is also the hash algorithm used in redis.

The existing mainstream big data systems all use MurmurHash itself or improve.

3. Why is nosql faster than sql?

Nosql is a non-relational database, which is fast because it does not need to meet the complex characteristics of relational database data consistency;

SQL is a relational database with powerful functions, but there are bottlenecks in efficiency.

4. What is an index and why nosql has no index? nosql has index drops

Indexes are divided into clustered indexes and non-clustered indexes. Clustered indexes are ordered according to the physical location of data storage, while non-clustered indexes are different; clustered indexes can improve the speed of multi-row retrieval, and Non-clustered index is very fast for single row retrieval.

Clustered index: when there is a primary key, a clustered index is created based on the primary key; when there is no primary key, a unique and non-empty index column will be used as the primary key to become the clustered index of this table; if the above two are not satisfied, then Innodb creates a virtual clustered index by itself

Non-clustered indexes: Non-clustered indexes are auxiliary indexes, such as composite indexes, prefix indexes, and unique indexes.

5. What is the difference between B+ tree and B tree?

The non-leaf node of the B-tree stores the pointer of the actual record, and the leaf node of the B+ tree stores the pointer of the actual record

The leaf nodes of the B+ tree are connected by pointers, which are suitable for scanning interval and sequential search.

[Summary of Alibaba Interview Experience]

In summary, the interview questions of the subsidiaries of Alibaba Group mainly focus on:

  1. Java advanced (virtual machine, concurrent thread, NIO, etc.).
  2. The middleware link is also a must. I especially like to ask about Redis data storage, persistence, clustering, etc.
  3. The focus of the back-end is the mastery of the MySQL database, starting with performance optimization such as indexes, sql slow queries, and long transactions.
  4. The projects that you have worked on should be reviewed in advance and must be asked. From design, to coding, and subsequent deployment, if you can answer quickly, you can leave a good impression on the interviewer.
  5. The interview questions that usually accumulate more algorithms are mainly involved in the scope of big data.
  6. Concurrent projects like spikes must also be prepared. Here, you will be tested on your technical knowledge of high-concurrency scenarios.
  7. It is recommended to keep smiling throughout the whole process, even if you encounter questions that you will not, answer frankly. It is recommended to ask the interviewer humbly after the interview (leave a good learning impression).

The above is the latest 178 interview questions developed by the Alibaba Department of Advanced Java. The interview questions cover a wide range, from technical foundation to project experience, from technical breadth to technical depth, and to fully explore the skill level of candidates. It is recommended that you spend more time reviewing the past and learning about the new before participating in an interview with any company, so that you will be more calm during the interview process and improve the concept of getting an offer.

If you find it useful, please like and support, thank you .

Send everyone [ Ali Advanced Java Compulsory Questions and Answers ] for reference

 

Friends who need to get the above interview summary are shown in the picture below:

 

Guess you like

Origin blog.csdn.net/bjmsb/article/details/109296553