Skip to content

3ein39/Sparse_Array_Matrix

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Representing an array of very huge indicies (e.g. 10^8) using doubly linked list ..

  • In some applications, we might want to represent an array with indices very huge (e.g. 10^8), however, most of it are just zeros (e.g. 95%).
  • Creating such huge arrays is very time & memory harmful with no return.
  • The following functions are supported :
    • Set & Get positions.
    • Print & Add arrays.

A more severe/common case is a sparse matrix where most of it are zeros which is implemented here.

  • Similarly, SparseMatrix acts like a 2D array.
  • Now we can think of sparse matrix as linked list of linked list
    • 2 linked lists.
    • First: the 1D array linked list
    • Second: linked list, the data of each node is a 1D linked list
    • Again .. A double ll is used.

Acknowledgements

About

Representing an array of very huge indices (e.g. 10^8) using doubly linked list

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages