2020 Beijing Institute of Technology 889 memories

The recall version from the inside (492,030,260) a small group of partners memories out of the discussion, I took the order, thank you for the 20 years after the mentees.

Please indicate the source: https://www.cnblogs.com/xuwangzihao/p/12081845.html

 

This is still incomplete, you have to think of it, but not above, the group can write or AT me in the comments section, or whisper me ~ Thanks again! ! ! !

 

20 multiple-choice questions

1, the order of the stack 123 to you, the stack order of 231, you ask the operating sequence. (Push, push, pop, push, pop, pop)

2. Which of the following statement error:

  Symmetric matrix storage memory only main diagonal and upper or lower triangular

  Without storing zero diagonal matrix

  Sparse matrices can triplet

  There are sparse distribution, can triplet

3, circular queue to your captain, head pointer location, address storage limit, you ask the tail

4, there is an undirected graph, each edge values ​​are different, ask which of the following options is wrong.

  A single spanning tree certain

  BC is very simple, I do not remember. . .

  The shortest distance between two nodes D must be the shortest distance between two nodes on a minimum spanning tree

5, an outer loop n, 2n inner loop of the program, you ask time complexity. (O (n ^ 2)) (note not selected from O (2n ^ 2), the progressive constant complexity omitted)

6, compression two-dimensional matrix :( answer should be cross-linked lists and ternary table, not to vote hash)

7, ask first trip to a sorting algorithm can determine the location of one of the fastest. (Bubble, heap sort, insertion, fast row)

8. Which of the following is not a constant space complexity :( merge, heap sort, quick row replacement selection sorting)

9, following which the operation order table different average complexity. (Delete one, find a insert the i-th, seeking long table) (table I chose seek long)

10, to give you a map and ask you which dfs sequence is not possible (simple question)

11, to give you an upper triangular matrix, ask your compressed into the one-dimensional (subscript from scratch), priority line under the situation, a33 subscript. (Simple and direct question number)

12, m order on the nature of the b-tree, each node of which the following error :( least two sub-tree root note)

  Each node subtree least 2

  Each node at most m-1 keyword

  Leaf nodes are at the same level

  Records are ordered

13, in the unlikely successor threaded binary sequence is likely to be :( ancestors, the Son, can not be brothers)

14, ask your abstract data type argument is wrong :( users can see outside, can clearly see the internal algorithms process)

15, to give you a sequence of binary search ask you compare the number of times a nonexistent number.

Fill in the blank 15 questions, 20 empty

1, gave a hash function and input sequence, what you ask one of the values ​​in the table are the key, ask your average search length. (I did not say where success or failure, I succeeded default)

2, you ask 100 Digital merge sort takes a few times (7)

3, in order to give you a prelude to traverse the level required.

4, radix sorting step :( distribution ) and collected

After 5, give you a sequence of steps of the trip and asked Hill 3 is sort of what

6,5 layer (layer excluding the leaf node) third order B most node leaves? least? (121,31)

7, how to delete u in a binary search tree, u known ancestor is p, u only left subtree.

8, to give you a avl insertion sequence (10,9,15,12,11), ask you traverse the level it rotated tree.

Complete binary tree 9, n nodes, the number of branch nodes?

10, a single linked list of deleted q successor node operation ()

11, to give you a hash function x% 7, and a few numbers, and you can ask the digital map 48 is the same position (62)

12, the generalized table ((a), (((b)), c), (d)), seek length, depth, header, footer

13, postorder traversal of the tree forest in preorder

14, to give you a sequence of binary search to ask you a number of comparisons exist numbers.

Short answer four?

1, in order to give you and traverse the level, so you draw that tree, and continued to write and before the sequencer.

2, asked the meaning and the complexity of your A program.

void A(p1,p2){

  B(p1,p2);

  B(p2,p1);

}

void B(LNode *s, LNode *e){

  LNode *p=s;

  while(p->next!=e)p=p->next;

  p->next = s;

}

3, a point 50, the edge 100 no 20 bytes, 10 bytes of side information, adjacency information of 4 bytes, n, m, type of each byte to FIG. 8, a point of information, represented by adjacency matrix, you ask how many bytes it takes to store this map. Further analysis ask you find no adjacency table storage component in communication complexity to FIG. (50 * 50 * 50 * 20 + (10 + 4) * 3 + 8)

4, give you 14 letters with weights, to design a ternary coding. (Trigeminal Huffman tree, nothing to say)

Algorithms question 3:

1, there is a string. Which contains only lowercase letters, design an algorithm all the 'a' at the top, the back rest. (Quick trip row)

2, to give you a single chain, the k-th element of the inverse of the output, the complexity of the requirements as low as possible, and can not destroy the list structure.

3, a binary tree, each node has a weight, a recursive algorithm designed to determine the weights of all the leaf nodes of the maximum weight.

Guess you like

Origin www.cnblogs.com/xuwangzihao/p/12081845.html