19 years Java interview Kong Share: upgrade Daguai jump three companies offer the ultimate gains Heart

Next, I will share with you one in here has got ants gold dress and fight a lot of companies offer a number of interviews with friends of experience in 19 years. Man of few words said, and then went into the topic. He has conducted ants, a lot of fight and beat bytes interview.

Preparation process

First talk about my own situation, I have ants in 2016 to nearly three months internship, then went to my old club now, 2.5 years of work experience after graduation has been honestly can say Daguai upgrade at his former club, although ants have internship experience, but because the time is too short, or a little vain.

Write ants is to add new points to resume, in fact, very early start the preparation process (of course this is not to say I quit thinking about the job, because I understand that now is not the end of the old club, I also need to continuously upgrade), specifically dating back to the time of departure of the ants, when it also faces a number of companies, nothing big companies face for about five companies were getting the offer.

Outside of work often go the extra technology research and technical work used in their own interest, strive to thoroughly understand the principle and practice on their own one. In addition, N bought many books, basically have time to see, Bubu basis, what operating system, data structures and algorithms, MySQL, JDK like source code, the basic brush up the (end of the text will be read out about yourself books and some good information). Know basis as "barrel effect" short board, determines how much water can hold.

In addition, before taking a decision to see the opportunity, I give myself a column of the outline, including the core elements of Java to master, there do not understand and get to know to find information. I have to position themselves or Java engineer, so Java system is sure to be aware of a lot of things there is no accumulation of perennial interview revealed the secret, it is easy to learn to be fair to yourself, do not lie.

Ants gold dress

19 years Java interview Kong Share: upgrade Daguai jump three companies offer the ultimate gains Heart

 

 

one side

An algorithm to do a side question, required to complete within two hours, to a length N array of repeating elements, the number of outputs in claim 10. Typical TopK problem row fast algorithm get. Note that the algorithm question the legitimacy of the check, boundary conditions, and exception handling. In addition, if the write test cases, test coverage must ensure as far as possible the whole scene. Plus the usual brush algorithm problems, this assessment should be no problem.

Two faces

  1. Introduce myself chant
  2. Open source project contribution through the code it? (Dubbo mentioned a print accesslog the bug count it)
  3. What to do in the current department, under the business brief, what the internal system, the role and the interaction that the next
  4. Which Dubbo stepped pit, namely how to solve? (Say the problem exception handling business exceptions captured customize an exception interceptor)
  5. Began to enter the topic, he said that under your understanding of thread-safe (multiple threads access the same objects, if not need to consider additional synchronization, call the object's behavior you can get the right result is thread-safe)
  6. What are the characteristics of the transaction? (ACID)
  7. How to understand atomicity? (Under the same transaction, a plurality of operation-or-nothing, or in case of failure there is no portion partially successful)
  8. The difference between optimistic and pessimistic locking in? (Pessimistic locking assumed conflict, time of the visit must first obtain a lock, to ensure the same time only a thread to acquire a lock, read also blocked; optimistic assumptions lock collision occurs only when the commit operation to check whether there is a conflict ) these two are locked in Java and MySQL is how to achieve? (Java optimistic locking by CAS implementation, pessimistic locking achieve .mysql optimistic locking by MVCC via synchronize, the version that is achieved, pessimistic locking can select ... for update plus exclusive lock)
  9. Why HashMap is not thread safe? (Multi-threaded operating without concurrency control, by the way, when the expansion will result in a deadlock, it will form a ring when multi-threaded access, but when expansion multithreading form a ring again JDK1.8 problem has been solved, but multi-threaded use HashMap there will be some other problems such as data loss, so you should not use HashMap multiple threads, but should use ConcurrentHashMap) how to make HashMap become thread-safe? (Collections synchronize method of packaging a thread-safe Map, or directly ConcurrentHashMap) What is the difference between the two is? (Former directly put and get added synchronize synchronization, which uses a segmented locking and support higher concurrency CAS)
  10. jdk1.8 ConcurrentHashMap of what had been done to optimize? (Insert time if the array elements using a red-black tree, cancel the sub-lock design, synchronize replaces Lock Lock) Why optimization? (To avoid serious conflicts long chain, improve query efficiency, improve time complexity from O (N) to O (logN))
  11. redis master-slave mechanism to understand it? How to achieve?
  12. GC tuning had the experience of it? (A bit empty, the answer was not very good)
  13. What's it like to ask?

Three sides

  1. Simply introduce myself
  2. How do the monitoring system, which is divided into how the interaction between the module, the module? What with the database? (MySQL) using what storage engine, Why InnnoDB? (Support services, clustered index, MVCC)
  3. Orders table has split what to do, how demolished? (Vertical and horizontal split Split)
  4. Query process described in the latter split level
  5. If you fall into a big slice of how to do data? (According to certain rules, such as a hash modulus, Range, splitting a single table to multiple tables)
  6. Hash modulo there any questions? (Some, uneven distribution of data, expansion of volume reduction is relatively complex)
  7. How to read and write the pressure to solve the sub-library sub-table? (From a multi-master, multi-master from multiple)
  8. Split emperor how to ensure the only key? (UUID, Snowflake algorithm)
  9. Snowflake generated ID is globally unique incremental Why? (Not just globally unique, single increments)
  10. How to achieve increasing global unique ID? (Told to take a number of ID, and then slowly the local distribution of the practice TDDL)
  11. Mysql index structure that the next (say B + tree, B + trees can be found on the order of leaf nodes, the leaf node is stored as node data and ordered)
  12. The difference between primary key index and the general index (leaf node the primary key index to store the entire row record, leaf nodes ordinary index stored primary key ID, query time needed to do a back table query) must return table query it? (Not necessarily, just when the query field is part of an index or index fields, you can not return to the table, which is covered by the principle of the index)
  13. Where the current bottleneck in your system?
  14. How are you going to optimize? Your optimization ideas under Briefly
  15. What I want to ask it?

All sides

  1. About yourself
  2. Why do the reverse?
  3. How to understand the micro-service?
  4. How to achieve service governance? (Say for current limiting, pressure measurement, monitoring module)
  5. This is not the middleware to do it, and why your department do? (There was no separate middleware team, just to engage in micro-services soon, the need for monitoring and performance optimization)
  6. Spring's talk about the life cycle of it
  7. Talk about the process of the GC (say the process of young gc and full gc trigger conditions and the recovery process as well as objects created)
  8. CMS GC What is the problem? (Concurrent sweep algorithm, floating garbage, a short pause)
  9. How to avoid floating garbage? (I remember a VM parameter setting allows scans to conduct a new generation of young gc before, but because gc is the virtual machine to automatically schedule, it is not guaranteed to perform. But there are parameter allows the virtual machine to enforce a young gc)
  10. Forced young gc what's the problem? (STW pause time longer)
  11. G1 know what? (Understand that)
  12. Recycling process is kind of how? (Young gc, concurrent phase, mixed phase, full gc, say Remember Set)
  13. Remember Set the bottom you mentioned is how to achieve?
  14. What's it like to ask?

Five-sided five-sided surface is HRBP, and I make an appointment ahead of time, before the main talk things internship experience ants, departments do, career development, benefits and so on. Ali interviewer really is a one-vote veto, is serious about whether your values match, generally prefer candidates rugged. HR surface must be honest, do not lie, as long as you lie HR will go to confirm a direct cut.

  1. Three months before the ants practice how not to stay?
  2. Who internship supervisor that?
  3. What training do things? (This also Nima ask?)
  4. How you feel about technology? What technology stack usually use? (Ali HR really is both Dangdie mother,)
  5. A recent study in what it
  6. How do you see the SRE
  7. What is it about the treatment of expected

Finally, HR also said to me, stability Security, currently very lack of people, and I hope I can return as soon as possible. Summary ants interview more emphasis on basic, basic skills so that Java must be solid. Ants work environment was quite awesome, because my face is stability and social security department, there are many separate groups, what three-year 1 class, very youthful feel. The interviewer basic levels are high, basically P7 above, in addition to the foundation asked a lot of questions in architectural design, the harvest is still getting bigger.

A lot of fight

19 years Java interview Kong Share: upgrade Daguai jump three companies offer the ultimate gains Heart

 

Before the interview

After the surface finish ants, already heard a lot of this fight Unicorn, I decided to go a surface. First of all I'm looking for a fight a lot of tenderness of HR, plus a micro-channel chat, the hair began to resume my journey to fight a lot of interviews. Thank you very much here to fight a lot of HR little sister, from the interview push to offer confirmation has been helping me, people were really nice.

one side

  1. Why ants stayed only three months? Not positive? (Regularization, explains a pass ...)
  2. In Java HashMap, TreeMap explain? (TreeMap red-black tree, orderly, HashMap disorder, an array + list)
  3. TreeMap is written and the time complexity of how much? (O (logN))
  4. HashMap multithreading What is the problem? (Thread-safe, deadlock) how to solve? (Jdk1.8 spent synchronize + CAS, expansion when checking whether there is modified by CAS, it is retry) retries have any questions? (CAS (Compare And Swap) are compared and the exchange will not result in thread blocking, but because of retries is achieved by spin, it will still take up CPU time, as well as the ABA problem) how to solve? (Timeout, limited the number of spins, ABA can be resolved through AtomicStampedReference principle variables were compared using the principle of version numbers) than the number of retries If it still fails how to do? (Synchronize mutex)
  5. CAS and synchronize What is the difference? We are used synchronize not? (CAS is optimistic locking, no blocking, atomic-level hardware implementation; synchronize clog, JVM-level atomic realization of different usage scenarios, the thread CPU can cause serious conflict CAS pressure, resulting in decreased throughput, synchronize. the principle is to spin then blocked threads serious conflict still has a higher throughput because threads are blocked, it does not take up CPU)
  6. If you want to ensure thread safety how to do? (ConcurrentHashMap)
  7. ConcurrentHashMap how to achieve thread-safe? (Segment lock)
  8. get need to lock it, and why? (No, volatile keyword)
  9. What is the role of volatile? (Ensure visibility of memory)
  10. Underlying how to achieve? (Said main memory and working memory, read and write memory barriers, happen-before, and draw the thread interaction diagram on paper)
  11. In multi-core CPU, the visibility of how to ensure that? (I thought for a while, the bus sniffing)
  12. Chat program, how is the interaction between the system?
  13. How many concurrent systems, how to optimize?
  14. Give me a piece of paper, drew a nine squares are filled digital, MN to a matrix, counterclockwise from 1 to print this number MN, requires time complexity as low as possible (heart OS: before seemingly encountered this problem, is how to achieve the optimal solution to the) thinking. . .
  15. You can start with the next idea (think of it, saying that the conditions for when to change direction, and to the right, down, left, up, and so the cycle)
  16. What I would like to ask?

Two faces

  1. Introduce myself
  2. There are other hand offer it? (Ant took the offer)
  3. What is the structure of the sector organizations? (Technically it is not this round, but still honestly say)
  4. What are the system modules, each with what technology, how the transfer of data? (Interviewer a little bald, a look that is high level) gave me a piece of paper, I drew in the above simple transfer case between the system
  5. Link Trace information is passed how? (RpcContext of attachment, said Span structure: parentSpanId + curSpanId)
  6. SpanId how to ensure uniqueness? (UUID, said the custom changes under internal)
  7. RpcContext is passed in what dimension? (Thread)
  8. Dubbo how to achieve a long-distance call? (Spoken read configuration, assembly url, create Invoker, service exports, service registration and consumers through dynamic proxy, filter, get a list of Invoker, load balancing and other processes (crashed talked over 10 minutes), what can I drink water )
  9. Spring singleton is how to achieve? (Singleton registry)
  10. Why should achieve a single service management framework? (Said internal service just to engage in micro soon, mainly to service some monitoring and performance optimization)
  11. Who dominated? Internal still use it?
  12. Reverse you have thought about how to make it universal?
  13. What's it like to ask?

Three sides, two faces directly HR boss face after face, and asked some major career development, whether there are other offer, as well as the entry of intent and other issues, by the way under the company's benefits, etc., are relatively routine matter. But to say that the hands of other manufacturers offer or experience there will be some extra points.

Summary fight a lot of the interview process is simple many, after all, is a company founded more than three years. Interview difficulty acceptable, as long as the solid foundation should not be a problem. But I have to say great work intensity, HR before the start of the interview in advance and I confirm whether to accept such work intensity, the old iron still wanted to be prepared

Byte beating

19 years Java interview Kong Share: upgrade Daguai jump three companies offer the ultimate gains Heart

 

Before the interview headlines interview three of the most professional home, and every time you have dedicated HR about time before the interview to interview to determine OK then. Each time through the video interview, as are the faces before all telephone or on-site surface, so the video interview is still a little unnatural. Some people think that video interview experience is like, of course, turnip greens all have love. Two faces when most of the other pit interviewer network always dropping the last wronged hung up (of course, there are some points answer was not one of the reasons). So it is still a little disappointed. one side

  1. To introduce myself
  2. Chat program, what is the meaning of reverse system
  3. Chat program, reverse system with which technology
  4. How to determine the number of threads in the thread pool?
  5. If the IO operation is mainly how to determine?
  6. If the calculation to determine the type of operation and how?
  7. Redis familiar with it, what data structure? (Say zset) zset how to achieve the underlying? (Jump table)
  8. Query process is how to jump table, query and insert time complexity? (Say start with the first layer to find, does not satisfy the second layer on the sink to find, because each layer is orderly, write and inserted into the time complexity is O (logN))
  9. Red-black tree to know what time complexity? (Say a balanced tree fork N, O (logN))
  10. Since the two data structures is the time complexity of O (logN), zset why not red-black tree (jump table to achieve a simple, low-cost stepping pit, red-black tree for every insert in order to maintain balance by rotating, implementation complexity)
  11. He nodded his head and said Dubbo under the principle of? (Say the service registration process and publish consumer and calls) stepped on what pit no? (Say dubbo exception handling and printing accesslog issues)
  12. CAS understand it? (CAS said that the realization of) also understand other synchronization mechanisms it? (To say the difference between the two as well as synchronize, an optimistic locking, pessimistic locking a)
  13. A question that we do it, the array A, 2 * n elements, n odd, n even numbers, design an algorithm that odd array subscript position placement is odd, it is even placed an even subscript position
  14. Let me talk about your ideas (traversing from 0 standard, if the index is odd odd determine whether the element is skipped, or looking for the next odd number from that location)
  15. Next odd? How to find? (A bit ignorant force, thinking ..)
  16. Why have ideas? (Still time to traverse the array, and the subscript judgment, if the index does not match the position of the element properties and a current through the array element from the target, and then replace)
  17. You complexity of this time a little high, if required O (N) how to do (to think for a moment and answered, "define two pointers, indices 0 and 1 from traversing met even and odd bit is a bit is an even number odd and stopped to exchange content ")
  18. Time is almost up, hang onto this bar. What do you want to ask me?

Two faces

  1. Many interviewers kind, you first introduce yourself
  2. How your understanding of the service of governance?
  3. Project limiting how to achieve? (Guava ratelimiter, the token bucket algorithm)
  4. Specifically how to achieve? (The point is a fixed rate and limited number of tokens)
  5. If suddenly a lot of threads simultaneously request token, what is the problem? (Resulting in many requests backlog, thread blocks)
  6. How to solve it? (Can be a backlog into the message queue and asynchronous processing)
  7. If you do not have a message queue how to solve? (Say RateLimiter pre-consumer policy)
  8. Distributed tracking context is how to store and transfer? (ThreadLocal + spanId, spanId current node as the next parent node spanId)
  9. Dubbo is how the RpcContext passed? (ThreadLocal) the main thread of ThreadLocal how transfer to the thread pool? (Said to get the context information through ThreadLocal get method on the main thread, creating a new set of ThreadLocal and the previously acquired context information to the ThreadLocal in the thread pool. ThreadLocal to note here is the thread pool to be created manually in finally remove, otherwise there will be a memory leak problem)
  10. You say specifically how memory leaks generated? (ThreadLocal said structure is mainly divided into two scenarios: the main thread ThreadLocal still has a reference to the main thread and the absence of references to the ThreadLocal first scenario because the main thread is still running, so there are still references to the ThreadLocal, then. the second scenario, although there is no reference to the main thread ThreadLocal variable and reference value will not be recovered on ThreadLocal, and the reference is a weak reference, it will be recycled in the gc time, but with a value not weak references, memory is not recovered, still cause a memory leak)
  11. Thread pool thread is not necessary to manually remove before they can recover value? (Yes, because the core threads in the thread pool has always been there, if you do not clean up, then the kernel threads threadLocals variable will always hold ThreadLocal variable)
  12. What do you say of a memory leak refers to the main thread or a thread pool? (The main thread)
  13. But not all out of the main thread, object references should not take the initiative to recycle it? (Interviewer and memory leaks on the bar), silent. . .
  14. What do you say SpringMVC information under different users logged on how to ensure thread-safe? (Just explained a bit ignorant force, it did not react, but still answered to lock up. Brain a little dizzy, now has an hour later, feeling something bad ...)
  15. The direct use of ThreadLocal Why can not you seen the code lock SpringMVC have achieved it? (A little dizzy vegetables ...)
  16. We talk about mysql, said that under the index structure (say a B + tree)
  17. Why use B + tree? (Say high query efficiency, O (logN), can take advantage of the characteristics of the disk read-ahead, multi-branch tree, small depth of leaf nodes in an orderly and store data)
  18. What is an index covering? (forgotten...)
  19. Why should parents Java design a delegation model?
  20. When do I need a custom class loader?
  21. We make it a question, a handwritten object pool
  22. What I ask of it? (I feel a lot of good points did not answer, is not hung up (really the result))

summary

The headline really professional interview, the interviewer will advance each time you send a video link, and then start the interview punctuality, and examine the points are relatively full.

The interviewer has a feature that will grab a point worthy of further or you did not say clearly point drill down until you clear this point, otherwise the interviewer will think you do not really understand. Two faces interviewer gave me some advice, technical research when we must go to research background, figure out what the scene to solve any particular problem, in fact, a lot of internal technology are interlinked.

to sum up

From the headlines years ago began the interview to feel complete about face more than a month of time, really a bit physically and mentally fatigued. Finally got a lot of fight, the ants offer, or very lucky. Headline interview helped me a lot, thank the interviewer sincere suggestion to me again, and fight a lot of HR for my long-winded answer detailed questions.

Here is that before the interview to do two things: self-introduction and resume, curriculum vitae to take some of the projects under review do it yourself, then pick out a few highlights of the project. We have basic self-introduction round interview, so it is best advance at their own practice, which would like to talk about good things, namely how to speak. In addition, the technology curriculum vitae mentioned must have been well-studied, there is no in-depth study is also looking at the best point data preheating, do not fight the battle unprepared.

The above is a friend to share the interview experience, the following are some of the latest addition to manufacturers of information interview, in this free share to people in need get way: Forward + attention backstage interviews private letter [information] to receive a free consultation way!

 

19 years Java interview Kong Share: upgrade Daguai jump three companies offer the ultimate gains Heart

 

 

19 years Java interview Kong Share: upgrade Daguai jump three companies offer the ultimate gains Heart

Published 159 original articles · won praise 45 · views 10000 +

Guess you like

Origin blog.csdn.net/qq_45401061/article/details/104224637