This collection mainly comes from the Internet (niuke.com, blog sites, etc.), and individuals are classified according to companies.
Ali.
Surface by 1
1. Briefly introduce the project 2. Know which data structures and their characteristics 3. 4.B+ tree? B+ tree how range query? What is the extreme case of B+ tree degradation? 5. Do you understand hopmeter? 6. Big top heap, small top heap understand? 7. The long address request is sent to the server, and the server redirects the short address to the client. How to map the long and short addresses? 8. So I now have 10 pieces of data and 1000 threads competing for it. What do you do? 9. What is distributed? Why distributed? What are the problems with distribution? How do distributed systems implement things? 10. What about Redis cluster? How do I handle an outage? Redis synchronization strategy? 11. Do you know the LRU algorithm? How would you do that? In what scenarios can this algorithm be applied? 12. Why is TCP a three-way handshake? How about twice? Can I do it more than once? 13. How is TCP security implemented? Can multiple TCP connections be established between two servers at the same time? How do you do that? 14. How does the customer service get the data the customer service wants after inputting a WEB address? How is it transmitted in the network? What locks does Java have? What is a shared lock? The CAS? Optimistic locks and pessimistic locks? The underlying principles of synchronied? Lock escalation? How do deadlocks form? How to break deadlocks?
Surface by 2
The school recruit
Java container: List,Set,Map The size of the eight basic data types and their encapsulation classes (unboxing and packing). How many threads block? How do I implement blocking queues myself? Java garbage collection reachability analysis -> Reference level -> Second tag (Finalize method) -> Garbage collection algorithm (4) -> Collection strategy (3) -> Garbage Collector (GMS, G1). Java memory model (TCP/IP) HTTP status code (ThreadLocal) : how to implement a local cache (ThreadLocal) How to load two classes with the same full path into memory? CMS collector and G1 collector TCP flow control and congestion control TCP flow control and congestion control How to implement 22, object-oriented design principles 23, the implementation of strategy mode 24, operating system memory management page elimination algorithm, introduce LRU (least recently used algorithm) 25, B+ tree characteristics and advantages
Surface by 3
The school recruit
Introduced themselves, and that there are no things in your resume says you watch recently in several technology (MySQL, multi-threaded) oral a statistics of the scene If the statistics for the scene without MySQL, but with the Java to implement, how to do If the amount of data is too large, in not Use the object-oriented thought to solve the above questions, Create a parent class, a subclass, a method, just to give you a sense of what’s going on in the next scenario, you dictated a login scenario, you used a thread pool to do login verification, what are the problems and how do you solve these problems and what are the drawbacks of the solutions you gave, what are the other solutions
Surface by 4
The school recruit
Talk about the class loading mechanism.
A hashmap and concurenthashmap
16GB machine, let you allocate JVM memory how to allocate.
Machine slow how to check.
Talk about Consul and ZooKeeper and the service discovery mechanism.
Detail the RAFT protocol.
Talk about the difference between Consul and Zookeeper.
What is the cause of service registration failure?
Describe your view of the relationship between RPC and service mesh.
Surface by 5
Two years experience in social recruitment
1. The principle of synchronized, how to ensure reentrancy, visibility, how to throw exceptions, and the difference between lock and lock, two threads access a synchronized static method at the same time, two threads access a synchronized static method and a non-static method, respectively, how to do
2. How do volatile memory barriers ensure visibility
3. You know those locks, optimistic lock and pessimistic lock, why read lock, why optimistic lock is suitable for reading scene, not write scene, what problems, CAS principle
4. When deadlock occurs, how to troubleshoot and solve it
5. Consistent hash principle, what problem is solved, data skew, why 2 to the 32nd, 20
Redis cache penetration, Bloom filter, how to use, what is the problem, how to solve this problem
7. Redis distributed lock, how to set the expiration time, if a service execution time is long, what to do when the lock expires, how to ensure the atomicity of lock release, you redis cluster, talk about the RedLock algorithm
Mysql transaction, clean read, clean write, isolation level, interlock principle, MVCC, magic read, interlock principle, when the interlock fails, how to do, other locks understand
Mysql > select * from left index prefix; select * from left index prefix
10. Online encountered too slow query, how to locate, optimize, explain, using filesort express what meaning, cause, how to solve
11. How to understand idempotence, have you met any actual scenarios, how to solve the problem, why to use Redis, redis expired or data lost
1. The principle of HashMap, put and GET, why 8 to red black tree, the process of adding nodes to red black tree, when to expand, why 0.75, expansion steps, why high and low bits, what are the optimizations from 1.7 to 1.8, what are the optimizations made in the Hash algorithm, what are the problems with the header method, why is the thread unsafe
2. Arraylist principle, why array add transient, add and get time complexity, expansion principle, and linkedList difference, principle, respectively in what scenarios, why
3. Know which concurrent utility classes
4. How to implement reentrantLock, a process of locking and releasing lock, AQS, fair and unfair, reentrantlock, interruptible
5. The principle of ConcurrenthashMap, PUT, GET, size, expansion, how to ensure thread safety, the difference between 1.7 and 1.8, why synchronized is used, what are the problems with segment locking, and what are the optimization of hash algorithm
6. Has threadLocal been used before, in what scenarios, how it works, how to deal with hash conflicts, how to implement capacity expansion, whether there are thread safety issues, causes of memory leaks, and how to solve them
7. What are the advantages and disadvantages of garbage collection algorithms? What are the GC roots
8. Understand what design patterns, factories, strategies, decorators, bridging patterns Tell me, what are the problems with singletons
9. Understanding of Spring AOP, what problems to solve, implementation principle, JDK dynamic proxy, cglib differences, advantages and disadvantages, how to implement method call
Select * from (a,b,c) where a =1 and b > 1 and c =1; Can I use the index? Why not use the B+ tree structure, why not use the red black tree, B tree, 10 million data about how many I/O
Mysql > alter table create primary key (s); mysql > alter table create primary key (s)
12. Redis thread model, what are the advantages and disadvantages of single thread? Why can single thread ensure high performance
13. How kafka ensures high availability, talk about its design architecture, why all reads and writes are in the primary partition, and what are the advantages and disadvantages of this
14. Know DDD
1. What is the state of a thread? How does the wait state occur
2. How do you understand thread-safety? What scenarios can cause thread-safety problems
3. What are the problems caused by mysql multi-transaction execution? How to solve these problems
4. Has the database and table been divided? How to do capacity expansion without shutdown
5. Do you use redis cluster, the process of expansion, and how does each node communicate with each other
6. Objects must be allocated on the heap, JIT, hierarchical compilation, escape analysis
7. The writing of ES, the query process and the underlying implementation, why is it so designed
8. Es cluster, brain split problem, how to produce, how to solve
9. What is wrong with new thread().start() while(true)
10. Socket understands the difference between TCP and UDP implementations
11. Design a seckill system that can handle tens of millions of concurrent tasks, but what if Redis can’t handle it
12. Project introduction
1. Tell me about the technology you are most familiar with: JVM, mysql, Redis
2. New Object[100] Specifies the size of an Object reference
3. How to solve the delay of primary/secondary replication in mysql
4. How to ensure the consistency between Redis and mysql? If the redis network has timed out, will the execution succeed
5. Redis persistence process, aOF persistence will block, generally when using RDB/AOF
6. Have you met the situation of large traffic online, what is the problem, why the database 2000QPS can not support, have you thought about the reason, how did you deal with it at that time
7. How to do current limiting? If you were asked to design a current limiting system, how to achieve it
8. What are the differences between Dubbo and Spring Cloud? What are the specific differences
9. Several scenarios are presented to solve the distributed transaction problem
Five surface
1. How to understand user mode, kernel mode, why to classify, there are several conversion methods, how to convert, conversion failure how to do
2. How to understand exceptions, what are their functions and how do you use them in your work
3. Do you use Redis, what do you do, what scenarios do you use it for, what problems do you encounter and how do you solve them
4. JVM meta-space memory structure, permanent generation problem
5. How do you usually solve problems in development? If there is an alarm online, how do you solve the problem
6. Why did you use MQ, did you encounter any problems and how did you solve them
tencent
Surface by 1
One side of the project: why do you use Redis to cache your own measurement of his concurrency -5000 have you considered how to optimize the 100,000 requests will face what problems? – Nginx data structure: If you want to use a hashmap, you can use a hashmap to split files and set them again. If you want to use a hashmap, you can use a hashmap to split files and set them again. What is the checksum in the packet? What about network congestion? – How does the congestion mechanism determine whether congestion occurs? What does the threshold mean
Surface by 2
School recruitment, cloud platform
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
Surface by 3
Two years experience in social recruitment
One side
Mysql > select * from ‘mysql’;
2. Redis Persistence strategy?
(1)RDB: In snapshot mode, the data in memory is directly saved to a dump file and saved periodically to save policies. When Redis needs to persist, it forks a child process that writes data to a temporary RDB file on disk. When the child process has finished writing the temporary file, the original RDB is replaced.
(2)AOF: Store all the commands to modify the Redis server in a file, a collection of commands. With AOF for persistence, each write command is appended to appendone.aof via the write function. The default policy of AOF is fsync once per second, and in this configuration, the loss of data in the event of an outage is one second at most. The disadvantage is that the AOF file size is usually larger than the RDB file size for the same data set. Depending on the fsync strategy used, AOF may be slower than RDB. Redis is the snapshot RDB persistence mode by default.
3. Zookeeper node type
4. Zookeeper election mechanism?
The primary ZooKeeper node is faulty. How do I re-elect the zooKeeper node?
6. Syn?
7. Core parameters of the thread pool
What does threadLocal do?
9. Principle of Spring DI;
10. Four waves;
Gc root select;
12, mark the process of clearing algorithm, mark clear algorithm how to allocate memory space to the object?
13. Disadvantages of CMS algorithm;
1. CorruntHashmap
2. ThreadLocal
3, a hashmap;
4. Java data type and synchronization mechanism;
5. Talk about greedy algorithms.
6, if online users appear 502 error how do you troubleshoot?
7, a large amount of concurrency, server downtime. What would you do?
Syn vs. Lock: Which is better? How to choose?
2, HashMap source, why 8 nodes become red black tree and why 6 nodes to restore to the linked list?
3. How to solve cache penetration?
4. Load balancing algorithm, implementation;
5. Disadvantages of polling and randomness;
6. Distributed service governance;
7. Differences between DNS iteration and recursion;
8. Algorithm: Longest palindrome string
9. Why three handshakes when you connect, but four handshakes when you close?
After receiving a SYN request packet from the Client, the Server sends a SYN+ACK packet. ACK packets are used for reply, and SYN packets are used for synchronization. However, when the Server receives a FIN packet, the SOCKET may not be closed immediately. Therefore, the Server can only reply with an ACK packet to tell the Client, “I received the FIN packet you sent.” I can send FIN packets only after all packets on the Server are sent. Therefore, THE FIN packets cannot be sent together. Therefore, a four-step handshake is required.
Surface by 4
Club for a year
1. Introduce yourself and ask some background questions
2. A few words about computer networks
3. Briefly describe the entire process of entering an address from the browser to the server
4. Talk about data structures
5. Have you used the operating system
6. What commands have you used in Linux
7. Check which ports a process listens on
8. Describe the project in detail (the domain name on your resume is not accessible)
9. Explain what you did in your previous work experience
10. Do an algorithm problem (determine whether binary tree is symmetric)
11. How is Java executed from source code to machine code
12. Java breakdown
13. Seven layers of the network
14. TCP \ UDP
15. HTTPS interaction
16. Linux basic commands
17. Linux boot process
18. Understand the prevailing CPU architectures on the market
19. Do you understand the concept of FPGA
20. Graph databases on the market
21. The RDF
22. Graph database underlying storage
23. B tree, the concept and difference of B + tree
24. Advantages, disadvantages and application scenarios of red-black tree balancing binary tree
25. Do you know about cloud technologies like Docker
Bytes to beat
Surface by 1
1. Introduce yourself
2. Business:
-
2.1 The difference between heap and stack
-
2.2 Procedure for calling a function in the heap
-
2.3 Cryptography man-in-the-middle attack, differences between RSA and DSA passwords, encryption process, private key encryption, public key encryption, digital signature process (related to my network space security background)
-
2.4 Type a URL
-
2.5 Rainbow Table, Kerberos, ECC(Elliptic Curve Encryption)
3.
1. TopK of an unordered array
2. Period statistics. Dynamic programming.
Surface by 2
One year experience in Java development
- Self-introduction;
- Project introduction;
- Hand tearing algorithm: NC95 longest continuous subsequence
- Hand tearing algorithm: NC91 longest increasing subsequence
- What’s the difference between thread and process? How do I create a thread? What are the states? What’s the difference?
- What new features does Java1.8 know? Focus on HashMap and CurrentHashMap.
- What is the difference between OSI Layer 7 protocol and TCP/IP Layer 5 protocol? Which layer is TCP/UDP? What do you know about TCP?
Surface by 3
Byte e-commerce backend
Algorithm problem
- Find the shortest path from the left leaf node of a tree to the right leaf node of a tree.
- Longest string of subroutines
- Given a number N, find all possible subsequences of (1-n). Let’s say I give you a 1 and I give you a 2 and I give you 1, 2, 1, 2
Process and thread
Why is process switching more expensive than thread switching?
Do you know the logical and physical addresses?
Select * from table T (id,name,salary,city) select * from table T (id,name,salary,city)
Which OSI layer does wifi belong to
Three handshakes four waves related (details, and why three, why four)
The underlying principles of hashMap
The difference between a red-black tree and a binary search tree, binary tree
Why don’t HashMaps just use red-black trees
Surface by 4
A:
1. How to implement the IM system user login?
2. How is the login status saved? How is the session obtained? How to identify the sessionID? What does the process look like? Have you considered distributed sessions?
3. Data type of Redis
4. The underlying data structure of Redis data type
5. Three handshakes and four waves
6.Redis persistence mechanism
MySQL InnoDB index data structure
8. Which SQL keywords will invalidate the index
Queue, stack, array, linked list
10. Leetcode 92
2:
1. Talk about the structure of a reptile
2. Do not clean the data captured by crawlers? Not heavy?
3. What more do you know about reptiles?
4.Linux interprocess communication mechanism
5. The difference between processes and threads
6. What data is private to the thread? (Not Java threads)
7. Talk about heap sort, the time complexity of each adjustment? Is heap sorting stable?
8. The principle of hash table, how to reduce the conflict of hash table, how to ensure the parallel reading and writing of hash table
9. Have you ever used Kafka? How does Kafka work? How can Kafka be highly available? How does Kafka keep messages organized?
10. The set implementation in the project is liked, while the zset implementation is concerned. Why?
11. Zset underlying implementation? What about the skip watch? What is the height of the node? How to determine the height of the node?
HTTPS, ok?
13. Know about man-in-the-middle attacks? How do I capture HTTPS packets? How to tamper with HTTPS?
14. Mapping from virtual addresses to physical addresses
15. Algorithm: Build a binary tree of minimum height for an array (recursive and non-recursive)
Three sides:
1. Introduce the projects you have done, which ones are challenging and difficult
2. How to use Netty in IM project, why to use Netty, and what is the long connection interaction
3. How are messages stored and sent? How do I know whether a message is read or unread
4. How do you update 5 messages after reading 5 more messages? Is your message idempotent?
5. How is ES used in the project? How does ES support search
6. How are comments stored on technology forum sites
7. Does the query comment scan the table in DB? How do you show all the comments? How about performance? What optimization can be done to make the query faster?
8. What are the problems when combining cache and DB? How to solve it?
9. Do you understand? Tell me about quickplatoon? What is the time complexity? Why does it degenerate into O(n^2)? Can a single linked list do quick sorting? What is the core logic of quicksort? So let’s write single-linked quicksort
Surface by 5
One side
1, Self introduction 2, Project 3, volatile principle and effect 4, what is instruction reordering, for example 5, AQS principle 6, JVM memory model 7, class loading process 8, parent delegation mechanism 9, Introduction to proxy mode 10, Redis data structure 11, HTTP status code, Header 12. Principle of MVCC 13. Algorithm: Stock problem
Second interview
- Why did the project start? What modules did you make
- How was your logging module designed and developed
- How do you make your token? How do you make your token unique
- How did you design the data sheet for the business module you developed? Which middleware did you use
- Mysql inooDB index (inooDB
- B+ tree index is how to achieve
- B tree and B+ tree
- Why doesn’t the middle node of a B+ tree store data?
- Give an index that does not follow the index in some queries, say why you can think of
- Are you familiar with red black trees?
- Ever used Redis?
- Talk about your understanding of Git
- Git rebase differs from Git merge
- Talk about your understanding of workflow
Hand tearing algorithm:
Given four integers, determine if 24 can be computed by adding () precedence to the four integers
Surface by 7
A: 3, Data streams (project) 4, data streams (project) 5, sorting (introduce you to sorting and complexity) 6, heap sorting (sort) 7, Basic ideas of heap sorting 8, Linux Operating system startup process 9, process and thread difference 10, process switching will happen 11, process scheduling algorithm 12, TCP, UDP difference 13, Java lock, keyword difference 14, fair lock, unfair lock explain
1. Algorithm: Reconstruct subtrees from sequential traversal; 2. Why non-static classes cannot be used in static classes (answered from class loading); 3. Java class loading process; 3.1. In the loading stage, why should there be a custom class loader? 3.2. Mechanism of the principle of parental delegation; 4.HashMap data structure; 4.1. Why is less than 6 a linked list and greater than 8 a red-black tree? 4.2.HashMap expansion mechanism; 4.3. Is HashMap thread safe? 4.4.ConcurrentHashMap and HashTable; 4.5. How ConcurrentHashMap ensures high efficiency, why it is thread-safe, why it is better than HashTable, and why it has a piecewise locking mechanism; 4.6. Does CAS guarantee thread safety? (I answered yes, the interviewer said no. Does volatile keep threads safe? 5. Find the roots of random numbers, such as the square root of two. (binary query) 6. There are n baskets, baskets are fixed, each basket has a different number of apples, move the apple, so that each basket apple average (mobile cost: 1 2 counts as 1 step, 1 3 counts as 2 steps) to minimize the number of steps;
2. What problems did you solve and what did you do? How to implement redis distributed lock 5. How to implement time expiration 6. How to expand ArrayList, time complexity O (n) O(1), what’s the average? Answer O(2) needs to be expanded. Mysql > HashMap > HashMap > HashMap > HashMap > HashMap 11, algorithm: LRU cache (), first talk about and then write
Surface by eight
Trill electrical contractor
1. Self-introduction 2. Explain the PUT method of HashMap 3. How does your custom protocol solve the sticky packet problem? Mysql > alter table LeetCode = LeetCode; mysql > alter table LeetCode = LeetCode; Why do I use B plus trees? Advantages of a clustered index over a non-clustered index 11. Four isolation levels of mysql, Application Scenario 12. How to solve magic read problems at repeatable read Isolation Level 13. Dubbo’s load balancing strategy 14. Java’s dynamic proxy 15. 17. How does MQ ensure that messages are not lost
Surface by 9
Oauth2 Basic process, principle login module is how to do the difference between cookies and session shopping cart why Redis storage, is permanent storage why shopping cart read and write more Redis how to remove expired keys, What are the strategies and procedures for lru how to implement hashtable how to implement hashtable how to implement ziplist how to implement ordinary hashtable how to implement hashtable how to scale up the benefits of using MQ the difference between MQ decoupling and microservice decoupling algorithms: Longest substring HTTPS connection establishment process (SSL/TLS negotiation process) Symmetric and asymmetric encryption pros and cons Why distinguish between kernel and user mode When do you switch from user mode to kernel mode when do you program the system call
MySQL > alter table table table table table table table table table table table table table table table table table table table table table table table table table table table table table table table table table table table table table table table table table table table table table table table table table table table table table table table table table table table table table table table table table table table table table table What is the handling of data insertion repeated insertion error, how is the handling of different things isolation levels implementation LC40 combination sum II
What problems did you encounter during the project? Where exactly did memory leak occur? Under what circumstances did multithreaded access cache penetration occur? How to solve cache avalanche? How to solve cache and database data consistency oversold problem? Given an array of characters and a string, find any substring in the string that is completely composed of the array of characters, the character order does not matter (sliding window)
Surface after 10
Project introduction; Handwritten SQL: Get the total sales of a store on every day in the last week. How do I determine if an index is hit? How to optimize indexes? What states do threads have? What are the blocking states? What are the differences? Hand tearing algorithm: NC90 stack shredding algorithm with min function: Finding the maximum value of nodes at each layer of binary tree Briefly introduces the ideas and time space complexity of the two algorithms. Optimization of the above two algorithms requires solving the above problems in O(1) and O(N) time complexity respectively.
baidu
Surface by 1
Shiro components distributed consistency algorithm ZooKeeper those can vote, can the leader vote? Netty zero copy implementation volatile, how to sense variable changes redis highly available HTTP how to cross domains? How TCP long links. How HTTP works with browser caching. Have you used message queues? How to extend your own validator JWT component header Payload signature encryption algorithm. How rsa applies to JWT the difference between synchronized and volatile what is a context switch, the URL parsing process what methods do HTTP have, get what is the difference between processes and threads. How to learn a new language by yourself
Surface by 2
I/O multiplexing is for each request (e.g., set, get), and the return value Redis is used. MVCC redo log and undo log flush dirty pages
Is the project my own practice project? How to find the project? The project is built from 0, or useful open source scaffolding. How to implement MQ idempotent and message backlog problem cache and database data consistency unique ID in Java how to ensure the mutual exclusivity of multiple threads what is the state of a thread AQS How to understand Spring IOC container Bean creation process is to create a singleton or multi-instance Bean SpringMVC implementation process using Spring and directly using Java language object-oriented development, What are the benefits how do you understand object orientation how do you understand design patterns policy patterns describe what are the modules that make up the JVM and how do you implement an SPI that breaks the parent delegate mechanism in the framework what are the areas that parent delegate garbage collection is mostly collected how do you identify which ones are garbage and which ones are root and when does a Full GC happen The difference between different garbage collectors is why TCP should hold three times, why should wave four times, and roughly what the process is to implement ring queue (array, add and remove functions) reverse linked list (iteration)
What are your interests and hobbies? How much do you know about Baidu? Do you often play basketball? What music do you like to listen to? What characteristics have done what have a sense of achievement behind the probability of choosing Baidu how many have thought about their own 5 years, 10 years is how
Surface by 3
2. What are thread pools in Java? Why use thread pools? Where have you used it or seen it? 3. What is the implementation of Mysql? Start with memory layout, disk layout, right? 4. What indexes does Mysql have? What problem does the difference between B trees and B+ trees solve? 5. Try catch finally Why use SpringBoot for development? How is it different from traditional development? 7. What are microservices? How do microservices register and discover services? 8. What are collection classifications in Java? Do you know the Queue? What implementation classes does she have under her? What about HashMap? 9. Which collection classes in collections are thread-safe? 10. What is a digital signature and what does it do? What algorithm is used? 11. What are the common network attacks? 12. What kind of attacks are easy to launch during form submission? 13. How to authenticate and prevent network attacks during service invocation? 14. What security frameworks have you seen? How does it work? (Shiro) 15. Two algorithm questions :1) ordinary binary search, ask some of the details, binary search problems? 2) Check whether there is a permutation of S2 in S1, return true if found, otherwise return false 17. String, StringBuilder, StringBuffer, the difference between a String is the difference between the two initialization? 18. Tell me about a Java project you have worked on. What frameworks are used? 19. Tell me about your research office project, your role in it, and the problem you solved.
Surface by 4
Spring transaction reflection principle Lock Underlying implementation thread pool practical application and how to design parameters database transaction isolation level dynamic proxy two implementations hashMap underlying data structure concurrentHashMap How to ensure thread safety parent delegate principle
Algorithm: two stacks to achieve the queue, linked list ring search entry
jingdong
Surface by 1
Kafka in the application scenario and project implementation of bitmap underlying object methods hashmap related sychronized and Reentrantlock related issues and lock upgrade CAS and volatile thread several states and convert JVM memory model SQL > alter table RDB; MySQL > alter table RDB; MySQL > alter table RDB; MySQL > alter table RDB
Surface by 2
Mysql > update (GcRoots); mysql > update (CMS); mysql > update (GcRoots); How to ensure network partition service loss of NACOS and service instances? Question 5. Why do YOU need to synchronize hr
Surface by 3
1. Index 2. Talk about multithreading 3. How to tune the JVM 4. A^2+B^2 = C; A^2+B^2 = C
Surface by 4
Describe the project difficulties and how to solve them
Synchronized synchronized synchronized synchronized synchronized synchronized synchronized synchronized synchronized synchronized synchronized synchronized synchronized synchronized
MySQL > select a B+ tree from a list, map, binary tree, or red black tree
Why do we have inverse and complement when we have source code
Scenario an array can be added continuously without an out-of-bounds exception to the array subscript. How do you do that? There are A, B two large files, each file dozens of G, and memory only 4G, where A file store student number + name, and B file store student number + score, require the generation of file C, store name and score. How do you do that?
Surface by 5
The state of the client and server after each wave. Why TIME_WAIT is twice the maximum keepalive time of a packet? 5, Bean lifecycle 6, BeanDefinitionReader how to read XML configuration 7, Bean instance creation there are several ways, AOP understanding, proxy mode, proxy underlying how to implement 9, SpringMVC process, 10, Thread pool, reject policy, task execution process, worker thread management 11, synchronized and Lock difference, sync in JVM how to implement Fair and unfair difference, preemption is how to reflect, is the queue in the thread to preempt the lock, AQS explain 12, database transaction concurrency, which kinds of isolation levels, and which way can solve the illusion 13, MVCC
1, What difficulties did you meet in the project? 2, how did you solve the problem of sticky packet and half packet? 3, how did you solve the problem of your custom protocol
Surface by 6
Database optimistic lock, pessimistic lock why Redis SQL statement execution order SpringMVC advantages, principle AOP advantages, principle IOC advantages, principle object-oriented concept encapsulation project encapsulation how to reflect high cohesion, low coupling what means, how to design an elevator scene, achieve object-oriented, high cohesion, Statistics on the number of shared bikes on campus, what do you think (open question)
shopee
Surface by 1
How do MESSAGE queues ensure reliability How do message queues ensure idempotent message queues Advantages and disadvantages why use B + tree clustering index and primary key differences, how do other engines do it Do the problem, linked list even and odd ordered output
Surface by 2
- To introduce myself
- What sort algorithms are there?
- Quick sort/heap sort/merge sort.
- How should indexes in a database be designed?
- What are the index failures?
- What is the submission method for the HTTP interface that you are using?
- The difference between GET and POST?
- What else besides GET/POST?
- Basic principles of object orientation? More on dependency inversion.
- What about the strategy mode and the observer mode?
- How can user requests be idempotent? Idempotency refers to the fact that the user may submit a payment request three times in a row and return the same result (payment success), but the background only performs it once to maintain consistency.
- What about TCP four waves?
- Did the client shut down immediately after the fourth wave? What is the state?
- Two large files, each line save a URL, look for duplicate urls in two files.
- How to find the 100th largest integer in a large file with an integer in each line?
- In a large file, each line has an integer. How to find the median?
- Basic data structure of Redis?
- How is Zset implemented? What are the commands?
- Algorithm problem force 221. Maximum square
Surface by 3
Self introduction, project introduction, asked about the amount of data
Know about microservices? (Have you conducted your own research during the project to understand the tools and methods commonly used by the enterprise?)
Know anything about springcloud?
What if one machine can’t handle the load? A: Build more machines. Q: How do multiple machines work together?
Answer: MapReduce
Explain MapReduce
If you have a large file, terabyte, and the file is out of order, how to sort? How is MapReduce implemented?
How do you describe merge sort in sorting? Time complexity
What is the difference between the concept of multithreading in Java and the concept of threads in OS? In real use, how are threads and processes scheduled in Java?
Multithreaded synchronous mutual exclusion method? Ask how to implement semaphores, answer PV operations, give specific scenarios, ask how to initialize variables (equivalent to dictating code)
What indexes are there? (mysql as an example)
What is the tree structure and query complexity of B tree and B + tree? Is it a balanced binary tree?
Ever used Redis? What exactly do you do?
Manual tear code: LRU algorithm; Sequential traversal of binary trees
netease
Surface by 1
Q3: Tell me what containers Java has;
Q4: What is the difference between a List and a Set? What do you mean non-repeatable?
Q5: Is HashMap thread safe? What if you want to use thread-safe HashMap?
Q6: What if you were to design a thread-safe HashMap?
Q7: Java reflection understand? When is reflection used?
Q8: Do you know what a paradigm is? Encoding: Write a generic class
JVM Q9: Talk about garbage collection in Java (from garbage validation and garbage collection algorithms)
Q10: What you just said are garbage collection algorithms, do you know the specific garbage collector?
Design Pattern Q10: Encoding: Write a singleton pattern
Q11: There are many singleton patterns. Which method implementation does this belong to? What else?
Q12: A bean in Spring has a singleton. Is this singleton the same as a bean singleton in Spring?
Data Structures and Algorithms Q13: What sort algorithms are there? How do they perform?
Q14: Coding: write a quick list (didn’t write it, delayed more than 10 minutes??)
Q15: Do you know binary trees? What are the properties of binary trees? < span style = “color: transparent; color: transparent; color: transparent; color: transparent;
Q15: Given a binary tree, write the pre-order, middle-order, post-order traversal
Surface by 2
Netease Cloud Music
Project extension; What do you know about optimizing your network? (extended to MySQL master-slave synchronization, TCP transport mechanism, Redis cache, etc.); What do you know about thread safety? (extended to AQS, ThreadLocal, Synchronized, lock upgrade, etc.); Know the difference between SSM and SpringBoot? How to build a project? How do I migrate both projects? Do you know IOC and AOP in Spring? How is the bottom layer implemented? Where is it reflected in the project? What aspects of the JVM memory structure and Java reflection are reflected in Spring? Shredding code :(merge + binary) keeps an array in order while keeping it safe and finds the target value or the number closest to the target value. How much do you know about basic music theory? What is the process of making a piece of music? How to use big Data to predict the next hit song (music theory + code level)
drops
Surface by 1
Project related (architecture of the project, key and difficult points in the project) Back to the longest text string know MySQL data structure, B + tree clustering index, the clustering index what circumstances will be back to the table dirty read, illusions, not repeatable read MySQL transaction isolation level how to implement (locking mechanism + MVCC), How to solve the magic read (gap lock, next key) Redis zset data structure (data structure is determined by the code, zset has two kinds of code, The corresponding data structures are respectively compressed list | jump table + dictionary) how to solve the conflict of the hash method (zipper, open addressing method, then the hash method) shake hands three times, four times wave (the more detailed, the better, said a detailed process, state transformation, shaking hands for the first time of do not account for the serial number, do not carry data ack (not (serial number, etc.)
Surface by 2
Item correlation (module division, project requirements, technical solution, database design, table structure and relationship, role) Key fields of the HTTP protocol, such as the key fields of the request and Response headers. The difference between HTTP and HTTPS, HTTPS is to solve the problem of three handshakes, four waves (detailed process + state change) occur a large number of close_wait possible cause, solution, List, Set, Map initial capacity loading factor Java thread communication mode, general principle if MySQL encounters poor performance, such as slow query, Do database optimization scheme (index | depots table) what are the indexes, data structure, the principle of index Depots table, tell me about the scene (horizontal vertical, thermal data | | cold data blabla) algorithm: the sum of two Numbers
huawei
Surface by 1
7.22 One side from the white board to achieve a two-way linked list, and write add, delete, change and check from the white board to achieve a binary tree, and add traversal method to talk about the project
Given a string s, you can convert it to a palindrome string by adding characters before the string. Find and return the shortest palindrome string that can be converted in this way
7.30 Three business executives met to talk about graduate students, what courses they have learned, what advantages they think they have, and where they want to develop in the future
Have a great
Surface by 1
Synchronized synchronized synchronized synchronized synchronized synchronized synchronized synchronized synchronized synchronized synchronized synchronized synchronized synchronized synchronized synchronized synchronized synchronized So let me talk about the difference between Lock and synchronized. 3. The seven parameters of the thread pool. Mysql transaction isolation level, and solved problems 6, MVCC implementation principle
Sorting is not easy, if you think it helps, you can point to encourage!
I am programmer Dabin, focus on Java backend core knowledge sharing, welcome everyone to pay attention to ~