Three-stream small company programmers have been looking for work in the past six months (2) Interview Questions

Source: Internet
Author: User
After half a year of intermittent work, I felt very depressed for a while and was rejected for various reasons. The most abnormal thing is that I did not pass the intelligence test, I was so depressed for a while. The feeling of being attacked and beginning to doubt yourself is really bad. By the end of November and the beginning of December, it seems that the peak has turned around. Good news

After half a year of intermittent work, I felt very depressed for a while and was rejected for various reasons. The most abnormal thing is that I did not pass the intelligence test, I was so depressed for a while. The feeling of being attacked and beginning to doubt yourself is really bad. By the end of November and the beginning of December, it seems that the peak has turned around. Good news

After half a year of intermittent work, I felt very depressed for a while and was rejected for various reasons. The most abnormal thing is that I did not pass the intelligence test, I was so depressed for a while. The feeling of being attacked and beginning to doubt yourself is really bad.

By the end of November and the beginning of December, it seems that the peak has turned around. The good news came one after another. I took four offers in one breath, including one state-owned enterprise, one US-funded enterprise, and two Chinese Nasdaq-listed enterprises, and they suddenly felt like they were in the dark. The next step is to worry about how to reject the offer, and first pass the state-owned enterprises and US-funded enterprises. These two companies are too comfortable, have no challenges, and are not very famous. I 've been tired of being asked: "Where do I work?", and I swear that I must find a famous east house. In the end, I chose a salary that is related to my background but with a lower salary, so I should pay more attention to development.

By the way, I have interviewed a total of 17 organizations over the past two months. I finally confirmed that four employees were offered, with a success rate of for your reference.

After so many questions, I will summarize the questions I have encountered during interviews with these companies for reference by our colleagues who want to change jobs early next year. It is not difficult to explain these questions, however, it is difficult to satisfy the interviewer. The part of basic knowledge can be handled by reading a book carefully. Answering questions from the interviewer on the whiteboard or on paper will test the psychological quality and programming skills.

Of course, it is very helpful to prepare carefully.

1. Questions about basic C ++ knowledge:

1. static and const usage: Why can't static functions call non-static member variables and member functions in a class? (Without the this pointer), how do I use the const member functions? Why can't const member functions modify member variables? (Const this pointer)

2. virtual functions: How to Implement pure virtual functions, polymorphism, and virtual function tables? Role of virtual destructor

3. How to Use auto_ptr and shared_ptr? (This is the only time an Internet company asked during a telephone interview)

4. Usage of type conversion, static_cast, dynamic_cast, reinterpreter_cast, and const_cast

5. overide and overload. Why cannot the constructor be a virtual function?

6. What is the difference between stdcall and cdecl?

There are also the C ++ interview questions of that pure US-funded enterprise. The questions are relatively biased, including class member pointers, temporary objects when the parameters are objects, and the template is special, it is recommended that you read Objective c ++ and the English C ++ common knodge DGE, which is also a useful book. You can also take a look at the book "exploring the C ++ Object Model in depth", but I feel that the situation discussed in this book is amazing, it is also polymorphism, multi-inheritance, and the stack of templates, which are basically used in engineering practice. Unless you want to invent a new language.

2. data structures and algorithms

This part is the most difficult part in the entire interview process, and is often the deciding link for deciding whether to give an offer. The best reference books for preparing data structures and algorithms are of course recognized as classic in the introduction to algorithms. This book is very systematic, but it has some mathematical evidence, this is not helpful for interviews. In the interview, what is the space complexity? What is the time complexity?

In addition, there is a useful book "algorithm Technical Manual", which contains the schematic diagram and pseudocode of many classic algorithms. This book is much more practical and efficient than "Introduction to algorithms.

The data structures frequently investigated during interviews include linked lists, arrays (strings), and binary trees. The data structures that are too complex are rarely asked. The only exception is the maximum heap and minimum heap.

Specific,

Linked List: Flip a one-way linked list (recursive and non-recursive), combine two sorted one-way linked lists into a sort list (merge sort), and find the first node of the intersection of the two linked lists

String: 1. Locate string B in string A and return the position. 2. Find a word that appears once in the string array and the two words that appear once? 3. Write an atoi Program (see my blog) 4. Write a strcpy program and handle exceptions when the memory application fails.

Binary Tree: Find the second (small) node of the Binary Tree

Others: Use two stacks to implement a queue

Several common sorting algorithms and Their deformation applications are important in the algorithm, including insert sort, merge sort, quick sort (deformation includes finding the maximum N number), and count sort. Write an error-free binary search (recursive non-recursive)

On-site Q & A on a whiteboard or paper is mainly used to test your basic programming skills. Generally, there will be no complicated algorithms, but it does not mean that you can easily pass them. The simpler the problem, the interviewer will examine the writing style and boundary check of the program very carefully (such as aoti program ). Of course, there are also exceptions. I once asked me to write the pop operation of the priority queue on the whiteboard. as it involved the heap reconstruction of the priority queue and the expression of the priority queue using an array, I was suddenly lost, I was a little angry with the indifference of the interviewer. I really want to tell him that I really can't remember it. Why don't you come and have a look? It was my most unpleasant interview.

3. Operating System

For Windows operating systems

1. What is the difference between a thread and a process? What is the thread synchronization method? The communication mode between processes. 2. Windows message transmission mechanism? 3. asynchronous socket and Connection Pool

Linux

1. Common commands, top, ps

2, \ proc \ * directory

3. Compress and package commands

4. C language debugging and Memory leakage check

5. How to Write mod in httpd? How to optimize http messages?

4, Miscellaneous

1. performance optimization problem, C10K

In addition, the interviewer may ask some project-related questions based on your project experience. For example, they may ask you: what is your most proud work in your project? What is the most unsatisfactory? For example, if my resume says that you are familiar with design patterns, the interviewer will ask you which design patterns have you used? List common design patterns? Therefore, it is also very important to carefully prepare a resume that gives you something to say.

This is basically what can be recalled.

Finally, I want to talk to the interviewer. In fact, I have also worked as an interviewer before deciding to change jobs, so I still have a better understanding of the interviewer's mentality. The interviewer of a large company, on the one hand, candidates such as cloud, on the other hand, has a lot of work at hand, and is also pulled by HR to interrupt the people at hand, sometimes it is inevitable that some emotions. In this case, we may see the situations I mentioned above. Let's get a relatively biased algorithm question (for example, how to implement the addition, deletion, and query of the red and black trees) without prompting you, then, press your keyboard or watch your resume, and the candidates will be able to find their brains. To be honest, I despise it very much. For a programmer who has been working for several years, I have no time to keep every line of this complicated program in mind, and I clearly understand that you can't change the role. I can make it difficult for you. If I come in, we will be co-worker. Do you think this is really necessary? And you also represent the image of your company. I don't think anyone wants to work in such a well-taught company.

So next time I decided to give the interviewer three words: don't remember! Of course, I can discuss with you the principle of the red and black trees. Why should we adopt such a balanced structure? Otherwise, what is the extreme situation? In this case, what is the time complexity?

Speaking of this, I would like to like MS's interviewer. Many people say that MS is going downhill now, and that all competent people are willing to come out of MS for the Internet, but from my interview experience, MS engineers are still very nice and highly qualified. For example, if you have some technical skills and have no idea at the moment, he will give you a prompt and continue to explore and inspire your ideas, so that you can get N methods, compare the time and space complexity to get an optimal answer. I think this is what a responsible interviewer should have.

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.