The third, fourth and fifth interviews

Game 3

Share the screen to do the questions (three simple questions)

  • Replace spaces with %20 (double pointers)

  • Delete duplicate elements (pointers) in ascending linked list
  • Valid parentheses (stack)

The fourth and fifth games

Self introduction

Project Torture

  • The entire project structure
  • The situation of rpc module
  • Where does the analyzed data come from and how to obtain it?
  • What are the shortcomings and improvements of the entire project?
  • The main work of the docker module

Let’s talk about DNS

What is the difference between the red-black tree at the bottom of the map and the binary search tree?

Introduce HTTP

Introduce virtual functions

Limitations on virtual functions

Introduce the data structure

Introduce commonly used sorting algorithms

Do you remember Dijkstra’s algorithm in graph theory?

Have you ever understood heap sort?

The difference between progress and thread

The difference between processes and threads in terms of memory

Introduce commonly used locks

Similarities and differences between mutex locks and read-write locks

Linux common commands

Do the questions

Merge two ordered linked lists (double pointers)

  • How to optimize when one of the linked lists is empty
    • If there are K linked lists and each linked list has n nodes, how to sort them?
      • Put all nodes into the small top heap, then create a new head node, and take them out of the small top heap in sequence (time complexity eq?O%28n%5E2%20*%20K%29)
      • Merge all nodes two by two and use the double pointer method to sort (the time complexity  eq?O%28n%5E2%20*%20K%29is about the same)
    • Interviewer: Put the head nodes of all linked lists into the small top heap each time, and only sort the head nodes.

Guess you like

Origin blog.csdn.net/Ricardo_XIAOHAO/article/details/133086306