Summary 3 game developer interview

1: talk about quick sort it

Quicksort worst time complexity of O (n²), the stack depth is O (n), the optimal case O (nlgn), the stack depth is O (LGN) , the average time complexity O (nlgn)

Derived average time complexity:

 

 Here posted a well written blog: https://blog.csdn.net/MASILEJFOAISEGJIAE/article/details/88371275 , gives a detailed derivation

 

2: red-black tree

About red-black tree, then learning can refer to this blog post: https://www.cnblogs.com/kumufengchun/p/11169138.html

Red-black tree Interview Questions: https://www.cnblogs.com/wuchanming/p/4444961.html

Online presentations can be found to red-black tree map, you can look at.

3:

B-tree

Is more than one balanced search trees. Definition of a B-tree of order M "

  1: Each node in the tree has at most m subtrees

  2: If the root node is not a leaf node, then at least two subtrees

  3: all non-terminal nodes except the root node having at least ceil (m / 2) -1 subtree

  4: each node in the order of the keywords are arranged from small to large, each of the left subtree all keywords in the keyword is less than it, and all the keywords in the right subtree are greater than it.

  5: all the leaf nodes are in the same layer

B-tree search, delete, insert, etc.

 

B + tree:

  Find the B + tree starts at the root can be, if not a terminal node key equal to a given value, does not terminate, but continues downward until the leaf nodes (as a non-terminal node contains only the keyword instead of the entire recording ); it can also start from the leaf nodes to find the smallest key order.

 

Scenarios can refer https://blog.csdn.net/qq_36183935/article/details/81095212

  

Guess you like

Origin www.cnblogs.com/amadios/p/11523768.html