Data structure notes 5 array

Data structure notes 5 array

Preface

Data structure notes 4 strings

Write a note about the array.

Mental framework

Five, array

exercise

Multiple choice

\7. There is a 10th-order symmetric matrix A, which adopts compressed storage method, mainly stores in row order, a11 is the first element, and its storage address is 1, and each element occupies an address space, then the address of a85 is ()

A.13 B.33 C.18 D.40

\8. Assuming that the two-dimensional array A=array[1…100,1…100] is stored in row order as the main order, and each data element occupies 2 storage units, the base address is 10, then LOC[5,5] =()

A.808 B.818 C.1010 D.1020

\9. Each element of the array A[0…5,0…6] occupies five bytes, and it is stored in the memory cell with the starting address of 1000 in column priority order, then the element A[5,5] The address is ().

A.1175 B.1180 C.1205 D.1210

10. Each element of the two-dimensional array A is a string consisting of 6 characters, the row subscript i=0,1,...,8, and the column subscript j=1,2,...,10. If A is stored in row first, the starting address of element A[8,5] is the same as the starting address of element () when A is stored in column first. Let each character occupies one byte.

​ A.A[8,5] B.A[3,10] C.A[5,8] D.A[0,9]

\11. The purpose of compressing and storing the sparse matrix is ​​().

A. Facilitate matrix operations B. Facilitate input and output
C. Save storage space D. Reduce computational time complexity

7.B 8.B 9.A 10.B

11.C

True or False

() Array can be regarded as a kind of extension of linear structure, so like linear table, it can be inserted, deleted and other operations.

() Array is not suitable as the storage structure of any binary tree.

() From the perspective of logical structure, each element of an n-dimensional array belongs to n vectors.

() After the sparse matrix is ​​compressed and stored, the random access function is bound to be lost.

() A sparse matrix Am n is expressed in the form of triples. If the values ​​of the row subscripts and column subscripts in the triples are exchanged, and the values ​​of m and n are exchanged, the conversion of Am n is completed .置 Operation.

4.X 5. X 6. √ 7. √ 8. X

to sum up

The common test point for arrays is the compressed storage of basic concepts and matrices.

Commonly used in images and videos.

Update address: GitHub

For more content, please pay attention: CSDN , GitHub , Nuggets

Guess you like

Origin blog.csdn.net/weixin_42875245/article/details/109176559