They did not ask me about the project in detail in the first and second sections, but there were a lot of hand-torn codes, totaling 8 in total. Here we make a summary according to the memory, ignoring the specific order of the questions

One, two

Basic knowledge:

1. What is the function of time_wait in TCP wave four? What are the consequences of removing this process? 2. The implementation mechanism of virtual functions? 3. What is the underlying data structure of a vector or queue? What are the benefits of circular linked lists? 4. Tell me more about balanced binary trees. And red black trees, right? 5. Know which sorting algorithms? Why don’t you tell me how quicksort and heap sort work? 6. Tell me more about TCP features. 7. Which mysql engines do you know? What’s the difference between InnoDB and MyISam? 8. Why use federated indexes? Select * from (a,b,c) where a=3,b>4,c=5; Why is that? 9. What are the features of shared locks? 10. What are things? What are the four properties of ACID? 11. What are the three paradigms? 12.TCP three-way handshake, what is the impact of changing to two-way handshake? 13. What are the modes of interprocess communication? Which ones? What are the features of pipes and message queues? 14. What are the four isolation levels for a database? What inconsistencies are resolved? 15. How does the browser complete the process from typing www.baidu.com to displaying the interface? 16. What is a deadlock? What are the conditions for deadlock formation? How do I avoid deadlocks? 17. What other network models do you know besides select network model? What is the difference between select and epoll network models? 18. What is the memory distribution of the process? What’s the difference between stack and heap, as much detail as possible?

—– if you recall, add —–

Algorithm questions (all written on the web page he gave, there are several codes I still keep after writing, four on each side, one side has not remembered) :

1. Find the longest loop substring given a string (the center extension method is not satisfactory, but also requires dynamic programming) 2. 3. A two-dimensional array, ascending from left to right and from top to bottom. Given a number, is it present in the two-dimensional array? 4. Handwritten quicksort

void QuickSort(vector<int> nums){
  int size=nums.size();
  if(size<=1)
    return;
  QuickSortCore(nums,0,size- 1);
}
void swap(int& a,int& b){
  int tmp=a;
  a=b;
  b=tmp;
}
void QuickSortCore(vector<int>& nums,int start,int end){
  if(end-start<=1)
    return;
  int i=start;
  int j=end;
  while(j>i){
    while(nums[j]>=nums[start] && j>i){
      --j;
    }
    while(nums[i]<=nums[start] && j>i){
      ++i;
    }
    if(j>i){
      swap(nums[i],num[j]);
    }
  }
  swap(nums[start],nums[i]);
  QuickSortCore(nums,start,i- 1);
  QuickSortCore(nums,i+1,end);
}

Copy the code

5. Given an array, find the largest sum of consecutive numbers (the sum of the largest subarrays)

int MaxContinueSum(vector<int> nums){
  int size=nums.size();
  if(size<1)
    return INT_MIN;
  if(size==1)return nums[0];
  vector<int> max(size,0);
  max[0]=nums[0];
  int maxSum=nums[0]
  for(int i=1; i<size; ++i){ max[i]=max(nums[i],nums[i]+max[i- 1]);
    if(max[i]>maxSum){
      maxSum=max[i];
  }
    return maxSum;
}
Copy the code

6. Find the nearest common parent of the given two nodes in the binary tree

Node* FindCloesestParent(Node* pRoot,Node* p1,Node* p2){
  if(pRoot==p1 || pRoot==p2){
    return nullptr;
  bool left=HasAimNode(pRoot->Pleft,p1,p2);
  bool right=HasAimNode(pRoot->Pleft,p1,p2);
  if(left&&right){
    return pRoot;
  if(! left && ! right)return nullptr;
  if(left){
    FindCloesestParent(pRoot->pLeft,p1,p2);
  }else{ FindCloesestParent(pRoot->pRight,p1,p2); }}bool HasAimNode(Node* pRoot,Node* p1,Node* p2){
  if(! pRoot){return false;
  if(pRoot==p1 || pRoot==p2){
    return true;
  }else{
    returnHasAimNode(pRoot->pLeft,p1,p2) || HasAimNode(pRoot->pRight,p1,p2); }}Copy the code

7. Find two numbers in an array that appear once and all other numbers appear twice.

conclusion

The overall feeling is that the basic knowledge of the interview is not very fine, mostly called me to tell, mainly see the interviewer to understand the full depth is not deep. Algorithm questions part of the difficulty is not high, brush questions enough problem is not big, is to pay attention to the code specification;

Three sides (Manager’s side)

1. What is your greatest accomplishment in college? What strengths do you think contributed to your success? 2. You said you did two data analysis projects. Could you give a brief introduction? 3. What do you think of the saying that programmers are easy to be eliminated after 30 years? 4. What do you think is your greatest strength in a practical job? 5. What was the biggest difficulty you encountered during your undergraduate and graduate years? How did you solve it? What did you learn? 6. What was your biggest failure and what did you learn during your undergraduate and graduate years? 7. Besides C++, what else is in your technology stack? 8. What are your strengths? 9. How do you see the problem of overtime work in the Internet industry? 10. Which area of study did you spend the most time on as a master’s student? You said you did well in the freshman year, but later your grades were average. What caused it? 12. Where do you see yourself in five years? 13. What was the most difficult class you had to take? How did you overcome the difficulty? 14. Have you worked on any open source projects on Github or looked at the source code?

In fact, most of the three problems are quite common, they usually pay more attention to thinking and summarizing the line, when the interview can temporarily organize language free play.

5.6 Receiving OC!