What the hell is SPARSE MATRIX?????

 There are 2D arrays that contain many zeroes in them, so they take so much memory space.

Sparse matrix are valid only when 2D arrays contain more zeroes than non-zero elements.

So to reduce the memory space taken we do one easy trick =>

We make a 2D array that contains 3 arrays of N size.

    WHAT IS THE VALUE OF N?

=> N is the number of non-zero elements present in a 2D array.

    WHAT ARE THE 3 ARRAYS PRESENT IN A 2D ARRAY?

=> First Array is of the row in which that non-zero element is present.

    The second Array is columns in which non-zero elements are present.

    The third Array is a collection of the values of non-zero elements.


                                                                



Comments

Popular posts from this blog

3 MAPPING TECHNIQUES

VIRTUAL MEMORY

ADJACENT MATRIX