Kee Ali Java Research and development students telephone interview

Source: Internet
Author: User

First of all, thank the Wang classmate gave me the opportunity to push in, let me from the written test of abuse ...

I am currently a junior, an internship in an internet company in Beijing.
Afternoon is working in the company, suddenly received a strange number in Beijing. Then went to the company outside the corridor to meet.
The slot is Ali's phone interview! There is no preparation at all, and did not expect such an early electric plane! Hard scalp on it.

The entire electrical surface lasted about one hours, and the interviewer was a young male (feeling), mainly asking the following questions:

    • For previous projects, pick one of the most fulfilling things to talk about.
    • Talk about your understanding of software architecture
    • An algorithm topic
    • The difference between a process and a thread, when to use multiple processes, and when to use multithreading
    • JVM's memory model, GC-side content
    • Career planning for the future
    • Ali headquarters in Hangzhou, why do you like Beijing on your resume?

Overall feeling answer is good, especially project experience, software architecture, algorithm aspects, I answer is probably: In a recent project used Nginx as a load balancer, reverse proxy server, upstream deployment of 2 tomcat, MySQL database read and write separation, Redis is also deployed as the database cache. In addition, I added a future plan to use database middleware to better triage, split the table. Then the interviewer asked me how I could do it, and I said cluster to avoid a single point, Tomcat, MySQL, Redis can do cluster deployment.

Algorithm, the interviewer has an not-so-difficult algorithmic problem on the phone (not involving greed, dynamic planning, and complex data structures):
Now there is a one-way list, and some of the data is stored in the linked list node. Now give a data, I want to find its position in the list. (I listen to this TM is too simple, my heart is happy) the interviewer went on to say, this is not the point, the point is that I want to find the node of this data is the first n nodes of the value.

The first 0.5 seconds of listening to the question I was thinking about searching forward through the front pointers, but the list is unidirectional and does not allow the data structure to be modified. 1.5 seconds I told the interviewer that you can use a queue of equal length and n to hold the nodes that have been visited, each access to a node, the value of the node, the team will be full when the oldest node out of the team. So when the search pointer hits the target node, the queue's value is what we want.

The interviewer was not satisfied, saying that the one-way list could be very long, such as hundreds of millions of nodes, the value of n is also very large, using the queue will consume a lot of memory.

How do you find the top N nodes without logging the nodes you've visited? Then my brain hole big open, thought whether want to test I use binary search tree to search? So I asked if the list could be sorted, and the interviewer could not answer. I open my mind again, do you want me to convert the list into a diagram and then bfs,dfs the meaning of the traversal? Fortunately, I promptly dismissed the idea of complicating the problem, thinking about the simplest way to solve the problem. At this time the interviewer said a word: "You slowly think, don't worry." "About 1 minutes has finally been the answer: Define two pointers, a pointer from the beginning to traverse the node, search for the node to find, while ensuring that the B pointer always maintains the distance of n nodes with a pointer. So when the A pointer hits the node, the B pointer points to the value that we want.

The interviewer was satisfied with the answer, so the algorithm phase was pass.

Then asked some JVM memory leaks, garbage collection problems, fortunately I studied the "in-depth understanding of the JVM", these questions are answered. and asked the thread and the process what the difference, this answer is good, but asked me when to use multi-process, I flying blind. I never use too much process concurrency! So I said that the multi-process memory space is independent, there is no say. Finally asked about my career planning, I Balabala said a lot, what programmers, architects, directors, CTO and so on.

Then the electrical plane ends and waits for notification.

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Kee Ali Java Research and development students telephone interview

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.