Bigo's Java interview, I hung in the third round technical side .........

background

Some time ago there is some things at home, resigned to go home until some time after the completion of deal with things back home here in Guangzhou to continue looking for work, probably a few days before the National Day I went to interview a company called Bigo (a subsidiary of YY ), interview for an oriented 3 - Java developers five years, ultimately pour yourself on the technical side of the third round. Although some regret and discouraging, but thinking about the record or write a blog to your own interview process well, it can be considered to share the majority of programmers fellow citizens, and I hope for you after the interview and learning can help.

Personal situation

Let me talk about the personal circumstances of the LZ.

17 years of graduation, two, currently located in Guangzhou, is a very common Java development programmer, you figure there are more than two years of development experience.

In fact, at this stage a little awkward, underachievement, little better than a junior programmer, but also reach the advanced level. Plus IT industry is now approaching saturation, many jobs are required at least 3 - 5 years or more experience in the development, so for about two years experience in the development of demand is actually relatively small, this is fully understood in the process of looking for a job in the LZ . The saddest thing is, this year's bad environment, many companies continue layoffs, let alone recruit people, cruel situation is even worse for job seekers, job seekers believe that many of the students also have experience. So, the next not a last resort, it is recommended not to bare resign!

Bigo interview

Interview job: Java development background

Experience: 3 - 5 years

Because it is the National Day went to interview Bigo, and now there are more than a month's time, although there is still the impression, but there are many questions face to forget, so I can only try to describe their own memories of the interview process, I do not understand also please forgive me!

One surface (surface micro-channel telephone)

Bigo first surface is micro-channel telephone interview, wanted to direct telephone surface, but the interviewer said I need handwriting algorithm problem, you change phone micro-channel surface.

  • Self introduction
  • First look at the basics of Java it, what is a memory leak and memory overflow? (Leakage refers to create too many objects runs out of memory space, overflow is not useless objects recovered)

  • JVM determine how objects are useless objects? (Root search algorithm, starting from GC Root, does not refer to an object, it is determined that useless objects)
  • Root root search algorithm which objects can be? (Class object, the virtual machine stack of objects, constant references to objects)
  • Overloading and rewrite the difference? (Overload occurs in the same classes, the same method name and different argument lists; rewrite behavior between father and son class, method name, the parameter list are the same, different methods of in vivo procedure)
  • There is no limit to rewrite what?
  • Which Java synchronization tools have? (Synchronized and Lock)
  • Both What is the difference (written before the comparison of the two articles, in accordance with the above knowledge about the talk, the article addresses: the Java concurrent programming: synchronized, Lock, ReentrantLock and ReadWriteLock of those things )
  • ArrayList and LinkedList difference? (ArrayList array-based, fast search, add or delete elements slow, LinkedList on the list, add or delete fast, because you want to search through the elements so inefficient)
  • Both collections Which is accounted for memory? (See situation, ArrayList expansion and if there are no elements in the array, then fill the wasted memory space is also more and more, but in general, LinkedList occupied memory will be relatively more, because each element contains a point before and after the node pointer)
  • Talk about the underlying structure of HashMap (array + linked list is too long to become red-black tree)
  • Why not thread-safe HashMap, HashMap have any questions prior to version 1.7 (when the expansion of multi-threaded operation may result in the list into the ring, and then call the get method will infinite loop)
  • ConcurrentHashMap understand it? Why does it say about the thread-safety (with the sub-lock)
  • What methods need to lock the entire collection? (Read size of the time)

  • Look at your resume says you know RPC ah, you say at the whole process of RPC? (Initiated from the client request, the socket transmission, then the server processes the message, and how to serialize the class are probably talk a bit)
  • After obtaining the server interface information to call the client, how to find the corresponding implementation class? (Reflection + notes right here do not really understand)
  • dubbo There are several load balancing algorithm? (random, robin, least number of active requests, consistency hash)
  • You say the least number of active algorithm is how is it? (Service provider has a counter to record the current number of simultaneous requests, the smaller the value the smaller the load the server, the server will give priority to the router)
  • Server algorithm know how to call the client? (Socket when passing messages over algorithmic strategies will be passed to the server)
  • Distributed Lock redis you used to do right, you write your own tools do? (No, we do redission Distributed Lock)
  • After the thread is how to get the key to ensure that no deadlock it? (The key to add an expiration time)
  • If the expiration time is up, but the program has not finished processing business, how to do? (Amount ...... can guarantee Idempotence on the business logic of it)
  • If more businesses that use distributed lock it, every business must ensure idempotency, is there a better way? Buyer No (amount ...... think the next clue, the interviewer said that skip it. Later I learned that redission itself is a watchdog monitoring thread, if the key is detected, then held it will reset the expiration time again)
  • You have a pen and paper right there, write an algorithm, a simulation with two stacks into the queue and dequeue. (Review because before, when there is the impression that this question, the time to write faster, probably took five minutes, and then into a picture sent to the interviewer, after reading the other represents no problem to end the interview. )

The first surface is not to ask difficult questions are also partial basis and the like, although the answer was not perfect, but the process is quite smooth. A few days later, Bigo's hr invited me to their company to participate in on-site interviews.

Two faces

Bigo to the company, one hr entertain the little sister I went to a conference room, waited for about half an hour, a middle-aged man came in, very polite, to say I am sorry I waited so long to make, and introduced it was technical manager, and then began our conversation.

  • By convention, let me introduce myself to do this process he is also watching my resume.

  • He said that under the project you are most familiar with it. (I recently took my last company to do a project began to introduce electric provider, from simple description of the project, the main function of the project, and I am responsible for the function module, it it it it ........ ......)

  • You are so familiar with this project, you look at your project architecture diagram, and say under which part you specifically involved in the draw based on your understanding. (This topic is quite troublesome, after all, I had to leave quite a long time, is somewhat vague on the framework of this project. Of course, finally bite the bullet and still drew about to begin access from the front, then nginx gateway layer, and finally to specific services, etc., and their own participation in the service module also marked out)

  • Your project uses a Spring Cloud GateWay, since you have already done Gateway nginx, why use gateWay it? (Nginx load balancing to do, and do gateway for access to the client's use, gateWay access services layer is made of a gateway, but also incorporates a fuse Hystrix)

  • What is the main role of the fuse Hystrix that? (To prevent a service call fails due to an avalanche service, can downgrade)

  • Your project uses a redis, redis is how you deploy? (Amount .... like sentinels mode deploy it.)

  • Talk about your understanding of the sentry mode? (I know that much, you probably said to Sentinel mode, there are the heartbeat mechanism similar to the ping command under the Sentinel monitors and the like, as well as how to determine a master is offline like .....)

  • Why do you use Sentinel model? How do clusters way to deploy it? He began to get less than a point, said Sentinel itself is multi-instance deployments, he explained, and said that the deployment of redis-cluster. (Amount ...... redis environment to build a dedicated operation and maintenance personnel deployment, high availability it should be a priority .......... getting a little flustered, because I do not know why)

  • Oh, did you feel there is no way to achieve high availability cluster do? (I do not .... is not, ah, just think sentry mode may be more to ensure the safety of the master copy from it ........ I do not know what they are talking)

  • Clusters also ensures high availability, you know how it is to ensure the consistency of master and slave do? (Ok, here really do not know, can only skip)

  • You must have micro believe it, if you allow to design micro-channel circle of friends, then, how would you design it attributes a member of it? (Ah ...... the need for user tables, bar tables circle of friends, friends table and the like)

  • Ah, well, you know micro-channel users, nearly as much as one billion, it will certainly be involved in sub-library sub-table, if it is you, how sub-library sub-table design it? (The point of this study larger problem, in fact I answer in general, and this process interviewer also continue to carry out chain gun question, resulting in this topic say there are nearly 20 minutes, limited space, there is no longer details)

  • Almost here, and finally you write an algorithm right, there is a set of integer array unsorted, you design an algorithm to match the two elements of the array, then the output of the absolute value of the difference between the largest and smallest absolute value of the difference between "log . "

    (This question is heard, my first thought is to use HashMap to store, key is the absolute value of the difference between the two elements, value is the number of pairs, if the same is incremented, it is not assigned to 1, and then finally map do sorting, the output value of the maximum and minimum value, after finishing the interviewer said although the results are correct, but the efficiency is not enough, because the time complexity of traversing become O (n ^ 2), then reminded me to sort this would want. I had an idea, you can do to sort the array, then the first element and the second element to do the absolute value of the difference, referred to as num, then the first element of the cycle and the elements behind to do the calculation, until the absolute value of the difference is not equal to num position , so that efficiency than O (n ^ 2) much faster.)

After the interview, the technical officer asked me what to ask him, I did ask for a technology stack that job responsibilities and projects used, then let me let's wait for the next, and so he went to inform the technical officer on three sides. To tell the truth, the two faces I feel most comfortable, because the interviewer was cordial, the interview process has been actively guiding me, and career planning gave me a lot of suggestions I have benefited, although the interview there is a half-hour, but it did not feel long, the entire interview process talk, quite comfortable, but because time is long, a lot of questions I can not remember.

Three sides

Half an hour after the end of the two faces, the technical interviewer on three sides began to come in from his forehead will be able to guess the amount of fat distribution is a big cow, man ruthless man of few words, after sitting down did not let me to introduce myself, directly open question, I answer the whole process is not good, but some question the interviewer's expression is not clear, often it needs to be repeated to confirm him clearly.

  • The transaction know? Talk about what transaction isolation level (I to a better understanding of Spring, the Spring to seven transaction isolation levels are described again)

  • Electricity supplier you have done, you should know when orders need to reduce the inventory right, suppose we have two services A and B, respectively, operating orders and stock table, the A preservation order, call B minus inventory when failed, A must roll back this time, the transaction to how the design? (Method B minus inventory service does not throw an exception, by the caller A service is to throw an exception)

  • Find out about the separate read and write it? (Amount ... probably understand that the time is to write into the main library, read, when read from the library)

  • You said when reading read from the library, now assume that a table User made a separate read and write, and then there are threads in a transaction scope for choosing to write the User table handling, and then making a deal with reading, this time not to synchronize data from the library, how to ensure that when reading can read the latest data? (Listening suddenly bit ignorant circle, for a time could not answer, the interviewer then said she wanted to write in a way to ensure that a transaction is the job the same library)

  • Your project uses rabbitmq, then you say at the consumer end mq is how to deal with? (That is, after the consumer receives the message, the first message into the database, and then run a timing message from the database)

  • That is your first mq is saved to the database and business logic that reads messages from mq and then reprocessing is not it? (Yes)

  • That is the only message you do? (Yes, with a unique constraint)

  • How do you ensure that the message must be the consumer? Or how guarantee it will be saved to the database? (Here began to panic, because mq access that piece I just read part of the logic, but not personally involved, with their knowledge of mq on replied, mechanisms should be confirmed by the ack rabbitmq)

  • Well, you sort out your entire processing logic flow of the consumer side, then talk about where you ack is returned (heard here my heart sank a length, mq access this part I did not participate, a stiff scalp according to their own understanding of the painting process a bit, but actually full of loopholes)

  • Such words as you draw, if the database is down suddenly, your message has been received confirming that how? Time (the amount of time ..... That would send a message to store the message can answer it ......... heart ten million mud road too ........ okay, did not play down the road.)

  • If the sender of that service is more than one deployment it? When you save the message database have been reported uniqueness of error? (Well, you win ... and finally he just Biechu did you say that this design does not ....)

  • Well, skip it, the main thread within 5 seconds you now to design a map, and then there are two threads to operate this map, elements of the main thread high speed adding and deleting map, and then there is the timing of asynchronous threads to delete the map do not remove the data, how would you design?

    (This question I answer was not good, do a simple thought can say at the map of key flagged timestamp, when traversal elements found in less than 5 seconds before the current time stamp on the deletion, the interviewer obviously not satisfied with this answer, say traversal will affect the efficiency, ps:! to this question, if you have any suggestions bigwigs can be said that under the comments section)

...... There are other issues, but I only remember so much, so be it.

After the plane finished the last question, the interviewer says that the interview process is over, let me go back to other news. Hearing this, I know basically be declared the results. In retrospect, his own performance this round of interviews is indeed very general, plus the time delay very long day from 2:30 to 6:00 interview has been more mentally tired filling. Sure enough, a few days later, hr micro letter informed me that I did not pass the third round of technical interview, this time the interview ended in failure.

to sum up

These are probably the interview process, have to say, maker of the interview is still very technical level, the process I learned a lot here at sharing some personal experience:

1, the foundation ! Foundation ! Foundation ! The important thing to say three times, no matter what stage of the programmer, the foundation is the most important. Each company will interview questions related to the basics, if your foundation is not solid, often the first face can be eliminated.

2, CV requires proper packaging . Honestly, my resume is certainly packaged, and this is my work experience is not enough, but it can get important reason Bigo interview, so the appropriate packaging it is necessary to look at the resume, but remember that is not divorced from reality , For example, obviously only two years of experience, but I just wrote three years. Small plants may muddle through, but the basic manufacturers is difficult, because many companies do background checks before entry.

3, to be very familiar with the technical points on their resumes . Packaging can resume, but it must be very familiar with the technical points on their resumes, demo rabbitmq such as simply wrote the words, do not write "familiar" and other words, because a lot of very in-depth interviewer will ask for a skill point, like chain gun as your understanding of the roots of this skill point.

4, items on the resume should be very familiar with . Generally, we do need to write resumes are certain procedures on their packaging and beautification project, the project is well written resume can give a lot of plus points. But it must be very familiar with the project, are not familiar with the module it is best not to write up. The author suffered a major loss, there is a project on electricity providers wrote processing orders with rabbitmq on my resume, though a little understanding through processing logic orders under that section, but not personally involved would not do in-depth understanding of when the interview on this last piece of content being forced to silence the interviewer Bigo three sides.

5, upgrade their infrastructure thinking . For middle-class programmers, daily work is the basic CRUD, the functions implemented on the bin, this way of thinking is not that bad, just want a higher level, then the time required to enhance the business under their architecture thinking ability, for example, if let you take over a project, you will consider how to design this project, from the overall framework, to introduce some components, to design specific business services, which are part of a design project must be considered, for upgrade our architecture thinking is a good exercise, it is also important to study part time many manufacturers interview senior programmer.

6, do not bare speech . This is my most simple suggestion, the environment is not good,且行且珍惜it, alas ~ ~ ~ ~

Overall, the interview Bigo is rewarding, though a little disappointed, but no regrets, after all, their own before the interview is also very good preparation, some topics A badly that I still have a lot of technical blind spots, do not know just do not understand, then such a blow blew out. It would be a reminder to me you are not old yet, and practice good internal strength, after all vegetables but original sin ah.

Guess you like

Origin www.cnblogs.com/yeya/p/11788956.html