Review of the data structure (II)

Sixth, special matrices, generalized table and its application

  • Line sequence order:
    • In the main program storage line order: one with m rows, columns two-dimensional array A n m * n- , a first row lines of the memory, then storing the second row, the m-th row
    • In the main program storage column order: A two-dimensional array having a row m, column n- m * n- , the first column lines of the memory, then storing the second row, the m column

  • Mapping relationship: symmetric matrix A ij of = A JI, I> = J is located in the triangle, k = i * (i + 1) / 2 + j; i <j upper triangular k = j * (j + 1 ) / 2 + i;

        Triangular matrix: upper triangular, lower triangular, with a constant C

        Diagonal matrix: then to a non-zero elements are concentrated centered on the main diagonal strip-like region

  • Converted subscript: symmetric matrix elements of a total of n (n + 1) / 2 th, one-dimensional array sa [n (n + 1) / 2] is stored

         Triangular matrix: sa [n (n + 1) / 2 + 1],

         Diagonal matrix: 3n-2 non-0 element, is nonzero, i = 0, j = 0,1 || 0 <i <n-1, j = i-1, i, i + 1 || i = n-1, j = n-2, n-1;

  • Videos :( triple table row number, column number, value), non-zero elements
  • Generalized exemplar header, footer write: tag = 1 table node, tag = 0 atoms junction.

 

 

 

Seven, Binary Tree and its application

  • Property master
  • Full binary tree, complete binary tree
  • Binary storage structure drawn
  • Binary master list
  • The establishment of a binary tree algorithm code
  • Binary tree traversal codes (recursive, non-recursive first order)
  • Binary Tree will draw clues
  • Huffman tree painting
  • Huffman codes achievements
  • Binary sort tree, binary sort tree sequence shown average length

 

Eight, trees and forests and their applications

  • Tree, forest, binary tree into each other
  • Sequential storage structure and algorithm tree traversal achievements
  • Parents, children, brothers, children representation, drawing
  • Tree traversal algorithm written order

 

Nine, hash structure and its application

  • FIG storage structure
  • Two ways to resolve conflicts
  • Structure analysis of a hash lookup performance insertion, linear

 

Ten, map and its application

  • FIG adjacency matrix building codes
  • Adjacency list
  • Depth-first traversal breadth-first search codes
  • Minimum spanning tree drawing
  • Puli Mu
  • Kruskal
  • Shortest Path
  • Topological sorting sequence

Guess you like

Origin www.cnblogs.com/hly97/p/12167118.html