Before receiving a satisfactory offer from a large company, the interview is also very important, so how to do a good job in the IT interview?

Direction 1: Share your tips for interviewing IT companies

  • Respond to difficulties calmly and calmly: In the examination room, examiners often ask some challenging questions aimed at the weak points of job applicants. Facing such examination questions, you must be calm, refute and appeal in a more tactful manner, and must not be emotional, let alone panic, so as not to arouse the examiner's resentment and lead to failure in the examination.
  • Be thoughtful and well-prepared: In the interview, sometimes the examiner asks questions without any standard answers, which requires the candidates to be as thoughtful as possible before answering the questions, so as not to put themselves in a passive position. To some extent, the interview is a kind of battle of wits. You must round up your own words so that they can be watertight.
  • You can’t speak too much, and you have to leave room for yourself: During the interview, for those questions that need to be explained from several aspects, or “trap” questions, you should pay attention to using flexible language expression skills, and don’t talk about it at the beginning. Talk about death. Otherwise, it is easy to put yourself in an awkward situation or fall into a "trap".
  • Rich in thinking, but practical: Occasionally, some weird imaginary questions will appear in the interview. These questions are generally uncertain and random, which also gives candidates room to use their imagination and make progress when answering. In the field of creative thinking, as long as you make full use of your accumulated knowledge and boldly match "assumptions" with "assumptions", you will be able to take the initiative and be sure of victory.
  • Finish what should be said, and don't say a word more than what should not be said: You must pay attention to keeping your mouth tight during the interview. If you think you have finished answering, don't say any more. It is best not to try to use the strategy of speaking more for self-promotion in order to let the recruiter know more about yourself in a short period of time. In fact, this method is not advisable for most people. Talk about what should be said, and never say more about what should not be said, let alone take the initiative to attack, so as not to add to the liking and make trouble out of nothing.
  1. Don't go to a company that's obsessed with a particular technology (unless you're one of those people): the first thing you need to understand is that technology is a means not an end. Focusing too much on the technology and not on the solution to the problem is the beginning of disaster. Specific techniques are not a guarantee of success.
  2. Don't go to a company with a lot of technical debt: we should find a balance between the first and the second. It is best not to go to a company that allows employees to use technology freely. Because no one wants to spend a weekend learning a baffling system just because the person who would maintain it has left the company and the system has found a new critical vulnerability.
  3. Don't go to a company where even the interviewer looks tired: if one employee looks tired, you will be too.
  4. Don't go to a company that can't tell you your initial workload: we should go to a company that can accurately estimate your initial workload (at least 3-6 months).
  5. Avoid companies that seriously impact quality of life: Quality of life is important, and our new jobs shouldn't have a detrimental effect on it. I bet these bosses don't care how many nights and all-nighters you have to stay up to get work done. All they will do is exploit your labor power as much as possible and drain you of all value.
  6. High salary and a small amount of equity - choose a high salary: a small amount of stock does not actually mean much. Many times, this is just a formality used to appease overworked employees. Not as good as money. Ps: This article only applies if these stocks cannot be sold on the exchange.
  7. Don't go to a company that doesn't have a formal training process: Every employee, no matter how experienced, always needs to learn when entering a new company. So we definitely need a lot of "hands-on" training and help in the first days. This is normal.
  8. Don't go to a company that bans diversity: promote the value of diversity and seek common ground while reserving differences so that people can work comfortably.
  9. Don't go to a company that doesn't respect you and your property: For example, if your company wants to use your phone as part of your job, then they should pay you in addition to your salary, or give you Equipped with a mobile phone provided by the company.
  10. Don't go to a company that lacks systematic processes: processes and policies determine the size of a company. The absence of some form of standards will lead to all sorts of technical and logistical debt problems.
  11. Don't go to a company that doesn't have an office culture: Every company, no matter how big or small, should have some form of office culture. A good atmosphere needs to be cultivated in company activities.
  12. Don't go to a company where there are unwelcome hiccups during the interview: if you get one during an interview, you can predict how many of these "surprises" you'll have in the future.
  13. Don't go to a company that asks useless questions during the interview: if you are asked a question during the interview that has nothing to do with your job, don't answer it.
  14. Don't go to a company that asks you to contribute to their codebase during the interview process: you're only interviewing and not already hired.
  15. Don't go to a company where interviews take up a lot of your working time without compensation: employers should respect the time of each candidate to come to interview. If they ask you to take a day or two off to do the interview, you should be compensated monetaryly.
  16. Don't go to a company that doesn't have a code of ethics: codes of ethics are very important.
  17. Don't go to a company that says it has an unlimited paid vacation policy: it's just another fancy way of saying "the company's vacation policy will be determined on a case-by-case basis." Knowing how much paid vacation time you have will allow you to plan your vacation.
  18. Avoid companies with questionable business practices: If the company you're interviewing with seems to be doing something illegal or unethical, it's best to stay away from them right away.
  19. Don't go to a company that enforces individual "ownership": new and existing systems should be owned by the entire engineering team. That being said, no one wants to be the only one who is always summoned if something goes wrong. And such a culture will cause everyone to be unwilling to innovate, unwilling to be the "owner" of a certain task or a certain technology.
  20. Don't go to a company that forces you to use your personal social media accounts to post ads: if the company asks you to post some announcements or job openings, that's fine. If it is forced, then the mood is not happy.
  21. Don't go to a company with a high turnover rate: If a company consistently fails to retain employees, there must be a reason.
  22. Don't go to a company that doesn't have a performance review: If a company doesn't appreciate the hard work of its employees, it doesn't deserve the value of that labor, and you'd better not go in. Know that besides raises and bonuses, water glasses and t-shirts are great incentives.
  23. Ask their employees what they don't like about their current job : this is very important. No matter how close you are, the answers from these employees will tell you a lot about the "secrets" of this company.
  24. Reach out to ex-employees and ask about their experience: Be humble and low-key. Let them know that you are considering XX and that you would really like to hear about their experience with that company. They will provide a lot of valuable information.
  25. Write down the reasons why you want to join the company, and then verify: For example, you want to join such and such company because they use the Python language. In interview projects you should ask them when and how they use Python. Make sure the company makes Python the form you want. Only by knowing yourself and the enemy can you be invincible in a hundred battles.
  26. If the company has public code on GitHub, be sure to take a closer look: every company has its own engineering process. Public code must be their pride. This is one of the best ways to evaluate a company's internal engineering process.
  27. Ask technical questions, then politely bring them up during the interview: Dealing with criticism is an important part of every job, especially technical ones. Whether it is useful or not, being able to accept criticism with an open mind is a sign of maturity. Also, you should observe their responses. If you don't agree with their approach to criticism or their responses, then don't choose this company.

  

Direction 2: What are the common questions in IT technical interviews?

  • Briefly introduce your situation?
  • how would you describe yourself
  • Why do you choose our company?
  • How did you prepare for this interview?
  • Why should we hire you?
  • Why are you applying for this position?
  • What is your expected salary package?
  • What is more important to you - work or money?
  • What do you expect from this career - money, prestige or career fulfillment?
  • Would you leave my company if another company offered you a higher salary?
  • What is your ultimate goal in life?
  • How do you prepare to achieve these goals?
  • Why did you choose this career?
  • Besides computers, what other interests do you have?
  • What are your strengths?
  • What are your weaknesses?
  • Do you think you can bring out your strengths in our company?
  • Do you fully understand the position you are applying for?
  • Did you often change your workplace before?
  • Why did you leave your previous employer?
  • What were the responsibilities of your last job?
  • What was your salary at your last job?
  • Why are computers suddenly so important?
  • Why do you feel the need to learn computers?
  • Do you think computers render people useless?
  • Will computers be able to think at some point in the future?
  • Please introduce yourself: It is too common for people to answer this question. They only say their name, age, hobbies, and work experience. skills, the most deeply researched areas of knowledge, the most positive part of personality, the most successful things done, major achievements, etc. These can have nothing to do with learning, or they can be related to learning, but it is necessary to highlight positive personality and The ability to do things will only be believed by companies who speak reasonably. Companies attach great importance to a person's courtesy, and job applicants must respect the examiner and say "thank you" after answering every question. Businesses like polite job applicants.
  • What do you think are the biggest strengths of your personality: calmness, orderliness, firm stand, and tenacity. Helpfulness and caring, adaptability and sense of humor, optimism and camaraderie.
  • Tell me about your biggest shortcoming: This question is very likely to be asked by companies, and usually they don’t want to hear the direct answer. Companies will definitely not hire you. Don't be smart enough to answer "My biggest shortcoming is too much pursuit of perfection". Some people think that answering like this will look better, but in fact, he is already in jeopardy. Companies like job seekers to start with their own advantages, add some small shortcomings in the middle, and finally turn the problem back to the advantages, highlighting the advantages. Businesses love smart candidates.
  • What do you think about overtime: In fact, many companies ask this question, but it does not prove that overtime is necessary. Just to test if you are willing to give to the company.
  • Sample answer: I will be obliged to work overtime if it is required by work. I am single now, without any family burdens, and can devote myself to work. But at the same time, I will also improve work efficiency and reduce unnecessary overtime
  • Your salary requirements: If your salary requirements are too low, it will obviously belittle your ability; if your salary requirements are too high, it will appear that you are too heavy and the company cannot afford it. Some employers usually set an expense budget for the position they are applying for in advance, so the price they offer for the first time is often the highest price they can give. They just want to verify that the money is enough to get you interested in the job.
  • Sample answer 1: "I have no hard requirements on salary. I believe that your company will be friendly and reasonable in dealing with my problems. I focus on finding the right job opportunity, so as long as the conditions are fair, I will not pay too much
  • Sample answer 2: I have been trained in systematic software programming, and extensive training is not required. And I'm also particularly interested in programming myself. Therefore, I hope that the company can give me a reasonable salary according to my situation and the level of market standards.
  • Sample answer three: If you have to name the specific number yourself, please don't name a broad range, as you will only get the minimum number. It's best to give a specific number, which shows that you have investigated today's talent market and know what value an employee with an education like yourself has.
  • In five years time, your career plan: This is a question that every candidate does not want to be asked, but almost everyone will be asked. The more common answer is "manager". But in recent years, many companies have established specialized technical channels. These job positions are often referred to as "consultant", "counselor technician" or "senior software engineer" and so on. Of course, it is also possible to name some other positions that you are interested in, such as product sales manager, production manager and other jobs that have a background related to your major. Need to know , Examiners always like aggressive candidates , At this time, if you say “ I do not know! ”, Maybe it will cost you a good chance. The most common answer should be "I am ready to make a difference in the technical field" or "I hope to develop in accordance with the company's management ideas".
  • Your friend's evaluation of you: I want to know about your personality and problems in getting along with others from the side.
  • Sample answer: "My friends say that I am a reliable person. Because, once I promise something to others, I will definitely do it. If I can't, I won't promise easily.
  • Sample answer: "I think I am a more easy-going person, and I can get along well with different people. When I get along with people, I can always consider problems from the perspective of others"
  • Do you have any questions?: This question seems to be dispensable, but it is actually very important. Companies don't like people who say "no problem", because they pay great attention to the personality and innovation ability of employees. Companies don’t like job applicants asking questions about personal benefits. If someone asks: Does your company have any training programs for new employees, can I participate? Or what is your company’s promotion mechanism? The company will Very welcome, because it reflects your enthusiasm for learning, loyalty to the company and your self-motivation.
  • If our unit hires you through this interview, but finds that you are not suitable for this position at all after working for a period of time, what should you do: After a period of time, I find that the job is not suitable for me, there are two situations: 1. If you really love this profession, Then you must keep learning, humbly learn business knowledge and experience from leaders and colleagues, understand the spiritual connotation and professional requirements of this profession, and strive to reduce the gap; Find a career that suits you and that you love, so that your development prospects will be greater, which is beneficial to both the unit and the individual.
  • When completing a certain job, you think that the method required by the leader is not the best, and you have a better way, what should you do: ①. In principle, I will respect and obey the work arrangement of the leader; at the same time, I will look for opportunities in private In the tone of asking for advice, express my thoughts tactfully, and see if the leader can change his mind; ②If the leader does not accept my suggestion, I will also earnestly complete the work according to the requirements of the leader;③. Under the circumstances, if the method required by the leader violates the principle, I will resolutely raise objections; if the leader is still stubborn, I will report it to the superior leader without hesitation.

Direction 3: Share and summarize the interview questions you have encountered

Please talk about the characteristics of red-black numbers, why there is a red-black tree?

Because the balance number requires that the height difference between the left subtree and the right subtree of each node is at most equal to 1, this requirement is too strict, and every time a node is inserted/deleted, the second part of the balance number will almost be destroyed. The rules, and then we all need to make adjustments by turning left and right to make it a balanced tree that meets the requirements again. Obviously, if in the scene where insertion and deletion are very frequent, the balanced tree needs to be adjusted frequently, which will greatly reduce the performance of the balanced tree. In order to solve this problem, there is a red-black tree, and the red-black number has the following Features:

  1. Has the characteristics of a binary search tree
  2. the root node is black
  3. Each leaf node is a black empty node (NIL), that is, the leaf node does not store data
  4. No adjacent node can be red at the same time, that is, red nodes are separated by black nodes
  5. For each node, all paths from this node to its reachable leaf nodes contain the same number of black nodes

Could you please talk about symmetric encryption and asymmetric encryption?

Credits: key, public key, private key

Symmetric encryption: Symmetric encryption refers to the use of the same key for encryption and decryption, so it is called symmetric encryption. Symmetric encryption has only one secret key, which acts as the private key. Common symmetric encryption algorithms include: DES, AES, 3DES, etc.

Asymmetric encryption: Asymmetric encryption refers to the use of different secret keys for encryption and decryption, one as a public public key and the other as a private key. Information encrypted with the public key can only be decrypted with the private key. Information encrypted with the private key can only be decrypted with the public key. Common asymmetric encryption algorithms: RAS, ECC, etc.

Bonus answer: Symmetric encryption is less secure than asymmetric encryption, because encryption and decryption use the same key, and data packets are not safe after being intercepted. In asymmetric encryption, the public key is used for encryption and the private key is used for decryption. The public key can be disclosed to any user for encryption, and the private key is always in the hands of the server or a certain client. It is very safe, and it is useless if the data is intercepted, because the data packet will never be opened if the private key is not disclosed.

Explain the TCP/IP protocol stack and briefly describe the function of each layer.

  • The TCP/IP protocol stack is the basis of Internet communication. It includes multiple layers, and each layer is responsible for different functions:
    • Physical layer: deals with the transmission of electrical signals and the connection of physical media.
    • Data Link Layer: Responsible for transmitting data frames between directly connected nodes.
    • Network layer: Provides the transmission and routing functions of data packets, such as IP protocol.
    • Transport layer: Responsible for end-to-end reliable data transmission, commonly used protocols are TCP and UDP.
    • Application layer: including various application protocols, such as HTTP, FTP, SMTP, etc.

In C++, how to use socket (Socket) for network communication? Please describe the basic socket programming flow.

  • Socket programming uses C++'s socket library function for network communication. A basic socket programming flow consists of the following steps:
    • Create a socket: use the socket function to create a socket, specify the protocol and communication type.
    • Bind Address: Use the bind function to bind a socket to a specific IP address and port.
    • Listening connection: For the server side, use the listen function to start listening to connection requests.
    • Accept connection: For the server side, use the accept function to accept the connection request from the client.
    • Sending and receiving data: Use the send and recv functions to send and receive data on a connection.
    • Close the connection: Use the close function to close the socket.

What is blocking IO (Blocking IO) and non-blocking IO (Non-blocking IO)? Please explain the difference and pros and cons between them.

  • Blocking IO means that when a program performs an IO operation, if the data is not ready or cannot be written immediately, the program will be blocked until the IO operation is completed.
  • Non-blocking IO means that when the program performs IO operations, if the data is not ready or cannot be written immediately, the program will not be blocked, but an error code will be returned immediately.
  • Differences and advantages and disadvantages:
    • The advantage of blocking IO is that it is simple to program, suitable for a single-threaded environment, and does not occupy CPU resources when waiting for IO to complete. The disadvantage is that if the IO operation takes a long time, it will cause the program to block and affect other operations.
    • The advantage of non-blocking IO is that it can realize asynchronous IO operations and improve program concurrency performance. The disadvantage is that it needs to poll the IO status continuously, which increases the complexity of programming and takes up more CPU resources.

How to use C++ to implement TCP-based server and client communication? Please describe the basic implementation steps.

  • Server-side implementation steps:
    • Create socket and bind address.
    • Listen for connection requests.
    • Accept client connections.
    • Send and receive data using the accepted connection.
    • Close the connection and release resources.
  • Client implementation steps:
    • Create a socket.
    • connect to the server.
    • Send and receive data using connections.
    • Close the connection and release resources.

What is Multiplexing? In network programming, how to use select or poll function to achieve multiplexing?

  • Multiplexing is a technique that allows a program to listen to multiple file descriptors (sockets) at the same time in order to process data as it arrives.
  • In network programming, you can use the select or poll function to achieve multiplexing. The basic steps are as follows:
    • Create and initialize fd_set (file descriptor set), add the socket to listen to to the set.
    • Call the select or poll function and wait for events on the socket to occur.
    • According to the returned ready socket, perform corresponding data sending and receiving operations.

Explain the process of TCP's three-way handshake and four-way handshake.

  • Three-way handshake process:

    • The client sends a SYN (synchronous) packet to the server, requesting to establish a connection.
    • After the server receives the SYN packet, it sends a SYN-ACK (synchronization-confirmation) packet to the client as a response.
    • After the client receives the SYN-ACK packet from the server, it sends an ACK (confirmation) packet to the server to complete the establishment of the connection.
  • Four wave process:

    • The client sends a FIN (end) packet to the server, indicating that no more data will be sent.
    • After the server receives the FIN packet, it sends an ACK packet for confirmation, but data can still be sent.
    • After the server sends the data, it sends a FIN packet to the client, indicating that the data has been sent.
    • After the client receives the FIN packet from the server, it sends an ACK packet to confirm, and then closes the connection.

What is asynchronous IO (Asynchronous IO)? In C++, how to use asynchronous IO for network programming?

  • Asynchronous IO is an IO model that allows a program to perform other tasks while an IO operation is in progress without waiting for the IO operation to complete.
  • In C++, you can use asynchronous IO libraries (such as Boost.Asio, std::experimental::net, etc.) to implement asynchronous network programming.
  • When using asynchronous IO, you can bind the IO operation to a callback function. When the IO operation is completed, the callback function will be called to process the result.

Please explain the difference between the HTTP protocol and the HTTPS protocol, and describe the encryption process of HTTPS.

  • HTTP protocol
    • It is a protocol for clear text transmission, and data is not encrypted when transmitted on the network.
    • The HTTPS protocol is a secure version of the HTTP protocol, which uses SSL/TLS encryption technology to encrypt data transmission.
  • The encryption process of HTTPS includes:
    • The client sends an HTTPS request to the server.
    • The server returns a certificate, containing the public key and related information.
    • The client verifies the validity of the certificate and generates a random symmetric key.
    • The client encrypts the symmetric key with the server's public key and sends it to the server.
    • The server decrypts the received symmetric key with the private key.
    • Client and server communicate encrypted using symmetric keys.

What is a Web Service (Web Service)? In C++, how to implement RESTful-based Web services?

  • A web service is an application that communicates over a network, using the standard HTTP protocol to interact.
  • In C++, you can use libraries (such as cpprestsdk, Poco, etc.) to implement RESTful-based web services.
  • The basic steps to implement RESTful-based Web services include: defining resources, selecting HTTP methods, processing HTTP requests, and generating HTTP responses.

How to deal with concurrent access and thread safety in network programming? Please describe some common thread synchronization and mutual exclusion mechanisms.

  • Concurrent access and thread safety can be handled through the following common thread synchronization and mutual exclusion mechanisms:
  • Mutex: Used to protect shared resources, only one thread is allowed to access at a time.
  • Condition Variable (Condition Variable): Used for communication and synchronization between threads, allowing threads to wait for specific conditions.
  • Semaphore (Semaphore): Used to limit the number of threads accessing shared resources at the same time.
  • Reader-Writer Lock: Multiple threads are allowed to read shared resources at the same time, but only one thread is allowed to write.
  • Atomic Operations: Provide atomic operations to ensure the indivisibility of operations and avoid race conditions.
  • A combination of condition variables and mutexes (Condition Variable with Mutex): used to implement more complex synchronization and waiting mechanisms.

C++ basics 

  • The difference and connection between C language and C++
  • The difference and connection between struct and class
  • The role of extern "C"
  • The difference and connection between function overloading and overriding
  • How to understand polymorphism, the principle of operating polymorphism
  • How to understand the virtual function mechanism, the structure of the virtual function table under the conditions of single inheritance, multiple inheritance, and virtual inheritance
  • If virtual functions are valid, why not make all functions virtual
  • Can constructors and destructors be virtual functions?
  • Pure virtual function usage scenarios and functions
  • IntroductionRAII
  • How to calculate the size of the class
  • The role of the volatile keyword
  • implement a thread pool
  • The principle and use of mandatory type conversion
  • The difference and connection and usage of pointer and reference
  • The difference and connection between new and malloc
  • Can the memory of malloc be released by delete?
  • Do new[ ] and delete[ ] have to be used in pairs?

How much do you know about the new features of C++11? 

  • Talk about auto and decltype
  • Talk about lvalues ​​and rvalues ​​and their references
  • What is move semantics and perfect forwarding
  • what is list initialization
  • Usage scenarios of function, bind, lambda
  • Talk about mutex and RAII lock of C++11
  • What is the smart pointer of C++11? Can a smart pointer be implemented independently?
  • The difference and connection between enum and enum class
  • Scenarios and solutions for memory leaks
  • How unique_ptr converts ownership
  • Talk about the understanding of object-oriented
  • Usage scenarios of inheritance and combination

STL series

  • The advantages and disadvantages of C++ directly using arrays and std::array, the implementation principle of std::array
  • The characteristics and realities of std::vector and clear, the difference between resize and reserve
  • Deque's underlying data structure and internal implementation principles
  • The difference between map and unordered_map and usage scenarios
  • List usage scenarios
  • Can std::find pass in the iterator corresponding to the list
  • Common functions of string

C language

  • Talk about the understanding of const
  • The difference between char*, const char*, char* const, const char* const
  • The difference between pointer constant and constant pointer
  • The role and usage scenarios of static
  • The difference between global variables and local variables
  • The role of macro definitions
  • The concept and necessity of memory alignment
  • The characteristics and disadvantages of inline inline functions
  • How to use C to implement the object-oriented features of C++ (encapsulation, inheritance, polymorphism)
  • How to improve the efficiency of memcpy
  • The difference between typedef and define
  • The role of extern and extern C
  • How to avoid wild pointers
  • Calculate the length of the structure
  • The difference between sizeof and strlen
  • Why should condition variables be used in conjunction with locks?

Design Patterns

  • Hungry thread, lazy thread-safe singleton mode
  • Observer Pattern Class Relationships and Benefits
  • Proxy Pattern Class Relationships and Benefits
  • Factory Pattern Concepts and Benefits
  • Constructor Pattern Concept
  • Adapter Pattern Concept

operating system

  • The difference between process and thread
  • How the operating system manages processes
  • How the operating system implements process blocking
  • How to communicate between processes
  • What is context switching and how does the operating system implement context switching
  • The realization principle of thread
  • Private and shared resources between threads
  • The difference between the heap and the stack in the general application memory space
  • Layout of process virtual space
  • How virtual memory is mapped to physical memory, what is paging memory management
  • Necessary conditions for deadlock, how to avoid deadlock
  • What are big-endian and little-endian, and how to convert byte order
  • The difference between a signal and a semaphore
  • The performance overhead of locks, the implementation principle of locks

Compilation principle

  • The specific execution process of the gcc hello.c command, what is inside the execution
  • Does the program have to start running from the main function?
  • How to determine that a function has been compiled output
  • The difference between dynamic link library and static link library

 

 

 

 

 

​​​​​​​ 

 

Guess you like

Origin blog.csdn.net/weixin_74957752/article/details/132155892