SlideShare a Scribd company logo
GANDHINAGAR INSTITUTE OF TECHNOLOGY
Computer Engineering Department
Data Structures (2130702)
Sparse matrix and its representation
Prepared By : Vardhil Patel
Enrolment No : ___________
Guided By:
Prof. ___________
Sparse matrix and its representation
Matrics play a very important role in solving many
interesting problem in various scientific and
engineering application. It is therefore necessary for us
to design efficient representation for matrices.
Normally matrices are represented in a two
dimensional array. In a matrix, if there are m rows and
n columns and then the space required to store the
numbers will be m*n*s where s is the number of bytes
required to store the value. Suppose there are 10 rows
and 10 columns and we have to store the integer values
then the space complexity will be bytes.
10*10*2=200 bytes.
Sparse Matrices
• Sparse matrix … many elements are zero means sparse
matrix has very few non zero elements
• Time complexity of the matrix will be O(n^2),because
the operations that are carried out on matrices need to
sces one row at a time and individual columns in that
row, results in use of two nested loops,
• Example: if the matrix is of size 100*100and only 10
elements are non zero. Then for accessing these 10
elements one has to make 10000 times scan. also only
10 spaces will be with non zero elements remaining
space of matrix will be filled with zeros only. i.e. we
have to allocate the memory of 100*100*2=2000.
Representation of sparse matrix:
• The representation of sparse matrix will be a triplet
only.
• In the sense that basically the sparse matrix means
very few non zero elements having in it rest of the
spaces are having the values zero which are
basically useless values or simply empty values.so in
this efficient representation we will consider all the
non zero value along with their positions. in a row
wise representation of spare matrix (sparse matrix
is 2D matrix) the 0th row will store total rows of the
matrix, total column of the matrix and total non
zero value
EXAMPLE:
0 0 3 0 4
0 0 5 7 0
0 0 0 0 0
0 2 6 0 0
INDEX ROW NO. COL. NO. VALUES
0 1 3 3
1 1 5 4
2 2 3 5
3 2 4 7
4 4 2 2
5 4 3 6
Chain Representation
row col
nextvalue
Node structure:
Single Chain
row 1 1 2 2 4 4
list = column 3 5 3 4 2 3
value 3 4 5 7 2 6
1 3
3
1 5
4
2
5
2
7
4
2
4
6
3 4 3
null
firstNode
2
One Linear List Per Row
0 0 3 0 4
0 0 5 7 0
0 0 0 0 0
0 2 6 0 0
row1 = [(3, 3), (5,4)]
row2 = [(3,5), (4,7)]
row3 = []
row4 = [(2,2), (3,6)]
valuecolumn
Sparse matrix and its representation data structure

More Related Content

What's hot

Doubly Linked List
Doubly Linked ListDoubly Linked List
Doubly Linked List
Ninad Mankar
 
Circular queue
Circular queueCircular queue
Sorting
SortingSorting
Arrays
ArraysArrays
Linear Search Data Structure
Linear Search Data StructureLinear Search Data Structure
Linear Search Data Structure
Talha Shaikh
 
Binary search tree(bst)
Binary search tree(bst)Binary search tree(bst)
Binary search tree(bst)
Hossain Md Shakhawat
 
stack presentation
stack presentationstack presentation
queue & its applications
queue & its applicationsqueue & its applications
queue & its applications
somendra kumar
 
Introduction to data structure ppt
Introduction to data structure pptIntroduction to data structure ppt
Introduction to data structure ppt
NalinNishant3
 
Binary Tree Traversal
Binary Tree TraversalBinary Tree Traversal
Binary Tree Traversal
Dhrumil Panchal
 
concept of Array, 1D & 2D array
concept of Array, 1D & 2D arrayconcept of Array, 1D & 2D array
concept of Array, 1D & 2D array
Sangani Ankur
 
Searching and Sorting Techniques in Data Structure
Searching and Sorting Techniques in Data StructureSearching and Sorting Techniques in Data Structure
Searching and Sorting Techniques in Data Structure
Balwant Gorad
 
Stack
StackStack
Arrays in Data Structure and Algorithm
Arrays in Data Structure and Algorithm Arrays in Data Structure and Algorithm
Arrays in Data Structure and Algorithm
KristinaBorooah
 
Binary Search Tree
Binary Search TreeBinary Search Tree
Binary Search Tree
sagar yadav
 
Priority Queue in Data Structure
Priority Queue in Data StructurePriority Queue in Data Structure
Priority Queue in Data Structure
Meghaj Mallick
 
Linked list
Linked listLinked list
Linked list
KalaivaniKS1
 
Asymptotic notations
Asymptotic notationsAsymptotic notations
Asymptotic notationsNikhil Sharma
 
Data Structure (Queue)
Data Structure (Queue)Data Structure (Queue)
Data Structure (Queue)
Adam Mukharil Bachtiar
 
Array
ArrayArray

What's hot (20)

Doubly Linked List
Doubly Linked ListDoubly Linked List
Doubly Linked List
 
Circular queue
Circular queueCircular queue
Circular queue
 
Sorting
SortingSorting
Sorting
 
Arrays
ArraysArrays
Arrays
 
Linear Search Data Structure
Linear Search Data StructureLinear Search Data Structure
Linear Search Data Structure
 
Binary search tree(bst)
Binary search tree(bst)Binary search tree(bst)
Binary search tree(bst)
 
stack presentation
stack presentationstack presentation
stack presentation
 
queue & its applications
queue & its applicationsqueue & its applications
queue & its applications
 
Introduction to data structure ppt
Introduction to data structure pptIntroduction to data structure ppt
Introduction to data structure ppt
 
Binary Tree Traversal
Binary Tree TraversalBinary Tree Traversal
Binary Tree Traversal
 
concept of Array, 1D & 2D array
concept of Array, 1D & 2D arrayconcept of Array, 1D & 2D array
concept of Array, 1D & 2D array
 
Searching and Sorting Techniques in Data Structure
Searching and Sorting Techniques in Data StructureSearching and Sorting Techniques in Data Structure
Searching and Sorting Techniques in Data Structure
 
Stack
StackStack
Stack
 
Arrays in Data Structure and Algorithm
Arrays in Data Structure and Algorithm Arrays in Data Structure and Algorithm
Arrays in Data Structure and Algorithm
 
Binary Search Tree
Binary Search TreeBinary Search Tree
Binary Search Tree
 
Priority Queue in Data Structure
Priority Queue in Data StructurePriority Queue in Data Structure
Priority Queue in Data Structure
 
Linked list
Linked listLinked list
Linked list
 
Asymptotic notations
Asymptotic notationsAsymptotic notations
Asymptotic notations
 
Data Structure (Queue)
Data Structure (Queue)Data Structure (Queue)
Data Structure (Queue)
 
Array
ArrayArray
Array
 

Similar to Sparse matrix and its representation data structure

Basic of array and data structure, data structure basics, array, address calc...
Basic of array and data structure, data structure basics, array, address calc...Basic of array and data structure, data structure basics, array, address calc...
Basic of array and data structure, data structure basics, array, address calc...
nsitlokeshjain
 
Basic MATLAB-Presentation.pptx
Basic MATLAB-Presentation.pptxBasic MATLAB-Presentation.pptx
Basic MATLAB-Presentation.pptx
PremanandS3
 
Multiplication of two 3 d sparse matrices using 1d arrays and linked lists
Multiplication of two 3 d sparse matrices using 1d arrays and linked listsMultiplication of two 3 d sparse matrices using 1d arrays and linked lists
Multiplication of two 3 d sparse matrices using 1d arrays and linked lists
Dr Sandeep Kumar Poonia
 
Arrays and library functions
Arrays and library functionsArrays and library functions
Arrays and library functionsSwarup Kumar Boro
 
array.pptx
array.pptxarray.pptx
array.pptx
ssuser651960
 
Svm Presentation
Svm PresentationSvm Presentation
Svm Presentationshahparin
 
Homework Assignment – Array Technical DocumentWrite a technical .pdf
Homework Assignment – Array Technical DocumentWrite a technical .pdfHomework Assignment – Array Technical DocumentWrite a technical .pdf
Homework Assignment – Array Technical DocumentWrite a technical .pdf
aroraopticals15
 
Tensor representations in signal processing and machine learning (tutorial ta...
Tensor representations in signal processing and machine learning (tutorial ta...Tensor representations in signal processing and machine learning (tutorial ta...
Tensor representations in signal processing and machine learning (tutorial ta...
Tatsuya Yokota
 
Arrays and library functions
Arrays and library functionsArrays and library functions
Arrays and library functions
Swarup Boro
 
arrays.pptx
arrays.pptxarrays.pptx
arrays.pptx
HarmanShergill5
 
2. Array in Data Structure
2. Array in Data Structure2. Array in Data Structure
2. Array in Data Structure
Mandeep Singh
 
Introduction to Matlab - Basic Functions
Introduction to Matlab - Basic FunctionsIntroduction to Matlab - Basic Functions
Introduction to Matlab - Basic Functions
joellivz
 
Introduction to matlab lecture 2 of 4
Introduction to matlab lecture 2 of 4Introduction to matlab lecture 2 of 4
Introduction to matlab lecture 2 of 4
Randa Elanwar
 
MATLAB - Arrays and Matrices
MATLAB - Arrays and MatricesMATLAB - Arrays and Matrices
MATLAB - Arrays and Matrices
Shameer Ahmed Koya
 
A study on solving Assignment Problem
A study on solving Assignment ProblemA study on solving Assignment Problem
A study on solving Assignment Problem
vivatechijri
 
Linear Algebra Presentation including basic of linear Algebra
Linear Algebra Presentation including basic of linear AlgebraLinear Algebra Presentation including basic of linear Algebra
Linear Algebra Presentation including basic of linear Algebra
MUHAMMADUSMAN93058
 
MATLABgraphPlotting.pptx
MATLABgraphPlotting.pptxMATLABgraphPlotting.pptx
MATLABgraphPlotting.pptx
PrabhakarSingh646829
 
Matrix Algebra : Mathematics for Business
Matrix Algebra : Mathematics for BusinessMatrix Algebra : Mathematics for Business
Matrix Algebra : Mathematics for Business
Khan Tanjeel Ahmed
 
Matrices
MatricesMatrices
Matrices
kja29
 

Similar to Sparse matrix and its representation data structure (20)

Basic of array and data structure, data structure basics, array, address calc...
Basic of array and data structure, data structure basics, array, address calc...Basic of array and data structure, data structure basics, array, address calc...
Basic of array and data structure, data structure basics, array, address calc...
 
Basic MATLAB-Presentation.pptx
Basic MATLAB-Presentation.pptxBasic MATLAB-Presentation.pptx
Basic MATLAB-Presentation.pptx
 
Multiplication of two 3 d sparse matrices using 1d arrays and linked lists
Multiplication of two 3 d sparse matrices using 1d arrays and linked listsMultiplication of two 3 d sparse matrices using 1d arrays and linked lists
Multiplication of two 3 d sparse matrices using 1d arrays and linked lists
 
Arrays and library functions
Arrays and library functionsArrays and library functions
Arrays and library functions
 
array.pptx
array.pptxarray.pptx
array.pptx
 
Svm Presentation
Svm PresentationSvm Presentation
Svm Presentation
 
Homework Assignment – Array Technical DocumentWrite a technical .pdf
Homework Assignment – Array Technical DocumentWrite a technical .pdfHomework Assignment – Array Technical DocumentWrite a technical .pdf
Homework Assignment – Array Technical DocumentWrite a technical .pdf
 
Tensor representations in signal processing and machine learning (tutorial ta...
Tensor representations in signal processing and machine learning (tutorial ta...Tensor representations in signal processing and machine learning (tutorial ta...
Tensor representations in signal processing and machine learning (tutorial ta...
 
Arrays and library functions
Arrays and library functionsArrays and library functions
Arrays and library functions
 
arrays.pptx
arrays.pptxarrays.pptx
arrays.pptx
 
2. Array in Data Structure
2. Array in Data Structure2. Array in Data Structure
2. Array in Data Structure
 
Introduction to Matlab - Basic Functions
Introduction to Matlab - Basic FunctionsIntroduction to Matlab - Basic Functions
Introduction to Matlab - Basic Functions
 
Introduction to matlab lecture 2 of 4
Introduction to matlab lecture 2 of 4Introduction to matlab lecture 2 of 4
Introduction to matlab lecture 2 of 4
 
MATLAB - Arrays and Matrices
MATLAB - Arrays and MatricesMATLAB - Arrays and Matrices
MATLAB - Arrays and Matrices
 
Algo>Arrays
Algo>ArraysAlgo>Arrays
Algo>Arrays
 
A study on solving Assignment Problem
A study on solving Assignment ProblemA study on solving Assignment Problem
A study on solving Assignment Problem
 
Linear Algebra Presentation including basic of linear Algebra
Linear Algebra Presentation including basic of linear AlgebraLinear Algebra Presentation including basic of linear Algebra
Linear Algebra Presentation including basic of linear Algebra
 
MATLABgraphPlotting.pptx
MATLABgraphPlotting.pptxMATLABgraphPlotting.pptx
MATLABgraphPlotting.pptx
 
Matrix Algebra : Mathematics for Business
Matrix Algebra : Mathematics for BusinessMatrix Algebra : Mathematics for Business
Matrix Algebra : Mathematics for Business
 
Matrices
MatricesMatrices
Matrices
 

Recently uploaded

Final project report on grocery store management system..pdf
Final project report on grocery store management system..pdfFinal project report on grocery store management system..pdf
Final project report on grocery store management system..pdf
Kamal Acharya
 
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
H.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdfH.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdf
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
MLILAB
 
English lab ppt no titlespecENG PPTt.pdf
English lab ppt no titlespecENG PPTt.pdfEnglish lab ppt no titlespecENG PPTt.pdf
English lab ppt no titlespecENG PPTt.pdf
BrazilAccount1
 
Investor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptxInvestor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptx
AmarGB2
 
Fundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptxFundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptx
manasideore6
 
The Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdfThe Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdf
Pipe Restoration Solutions
 
Immunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary AttacksImmunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary Attacks
gerogepatton
 
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
bakpo1
 
weather web application report.pdf
weather web application report.pdfweather web application report.pdf
weather web application report.pdf
Pratik Pawar
 
Architectural Portfolio Sean Lockwood
Architectural Portfolio Sean LockwoodArchitectural Portfolio Sean Lockwood
Architectural Portfolio Sean Lockwood
seandesed
 
Student information management system project report ii.pdf
Student information management system project report ii.pdfStudent information management system project report ii.pdf
Student information management system project report ii.pdf
Kamal Acharya
 
MCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdfMCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdf
Osamah Alsalih
 
The role of big data in decision making.
The role of big data in decision making.The role of big data in decision making.
The role of big data in decision making.
ankuprajapati0525
 
Cosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdfCosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdf
Kamal Acharya
 
road safety engineering r s e unit 3.pdf
road safety engineering  r s e unit 3.pdfroad safety engineering  r s e unit 3.pdf
road safety engineering r s e unit 3.pdf
VENKATESHvenky89705
 
ML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptxML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptx
Vijay Dialani, PhD
 
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Sreedhar Chowdam
 
Runway Orientation Based on the Wind Rose Diagram.pptx
Runway Orientation Based on the Wind Rose Diagram.pptxRunway Orientation Based on the Wind Rose Diagram.pptx
Runway Orientation Based on the Wind Rose Diagram.pptx
SupreethSP4
 
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
ydteq
 
Railway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdfRailway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdf
TeeVichai
 

Recently uploaded (20)

Final project report on grocery store management system..pdf
Final project report on grocery store management system..pdfFinal project report on grocery store management system..pdf
Final project report on grocery store management system..pdf
 
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
H.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdfH.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdf
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
 
English lab ppt no titlespecENG PPTt.pdf
English lab ppt no titlespecENG PPTt.pdfEnglish lab ppt no titlespecENG PPTt.pdf
English lab ppt no titlespecENG PPTt.pdf
 
Investor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptxInvestor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptx
 
Fundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptxFundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptx
 
The Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdfThe Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdf
 
Immunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary AttacksImmunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary Attacks
 
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
 
weather web application report.pdf
weather web application report.pdfweather web application report.pdf
weather web application report.pdf
 
Architectural Portfolio Sean Lockwood
Architectural Portfolio Sean LockwoodArchitectural Portfolio Sean Lockwood
Architectural Portfolio Sean Lockwood
 
Student information management system project report ii.pdf
Student information management system project report ii.pdfStudent information management system project report ii.pdf
Student information management system project report ii.pdf
 
MCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdfMCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdf
 
The role of big data in decision making.
The role of big data in decision making.The role of big data in decision making.
The role of big data in decision making.
 
Cosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdfCosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdf
 
road safety engineering r s e unit 3.pdf
road safety engineering  r s e unit 3.pdfroad safety engineering  r s e unit 3.pdf
road safety engineering r s e unit 3.pdf
 
ML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptxML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptx
 
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
 
Runway Orientation Based on the Wind Rose Diagram.pptx
Runway Orientation Based on the Wind Rose Diagram.pptxRunway Orientation Based on the Wind Rose Diagram.pptx
Runway Orientation Based on the Wind Rose Diagram.pptx
 
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
 
Railway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdfRailway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdf
 

Sparse matrix and its representation data structure

  • 1. GANDHINAGAR INSTITUTE OF TECHNOLOGY Computer Engineering Department Data Structures (2130702) Sparse matrix and its representation Prepared By : Vardhil Patel Enrolment No : ___________ Guided By: Prof. ___________
  • 2. Sparse matrix and its representation Matrics play a very important role in solving many interesting problem in various scientific and engineering application. It is therefore necessary for us to design efficient representation for matrices. Normally matrices are represented in a two dimensional array. In a matrix, if there are m rows and n columns and then the space required to store the numbers will be m*n*s where s is the number of bytes required to store the value. Suppose there are 10 rows and 10 columns and we have to store the integer values then the space complexity will be bytes. 10*10*2=200 bytes.
  • 3. Sparse Matrices • Sparse matrix … many elements are zero means sparse matrix has very few non zero elements • Time complexity of the matrix will be O(n^2),because the operations that are carried out on matrices need to sces one row at a time and individual columns in that row, results in use of two nested loops, • Example: if the matrix is of size 100*100and only 10 elements are non zero. Then for accessing these 10 elements one has to make 10000 times scan. also only 10 spaces will be with non zero elements remaining space of matrix will be filled with zeros only. i.e. we have to allocate the memory of 100*100*2=2000.
  • 4. Representation of sparse matrix: • The representation of sparse matrix will be a triplet only. • In the sense that basically the sparse matrix means very few non zero elements having in it rest of the spaces are having the values zero which are basically useless values or simply empty values.so in this efficient representation we will consider all the non zero value along with their positions. in a row wise representation of spare matrix (sparse matrix is 2D matrix) the 0th row will store total rows of the matrix, total column of the matrix and total non zero value
  • 5. EXAMPLE: 0 0 3 0 4 0 0 5 7 0 0 0 0 0 0 0 2 6 0 0 INDEX ROW NO. COL. NO. VALUES 0 1 3 3 1 1 5 4 2 2 3 5 3 2 4 7 4 4 2 2 5 4 3 6
  • 7. Single Chain row 1 1 2 2 4 4 list = column 3 5 3 4 2 3 value 3 4 5 7 2 6 1 3 3 1 5 4 2 5 2 7 4 2 4 6 3 4 3 null firstNode 2
  • 8. One Linear List Per Row 0 0 3 0 4 0 0 5 7 0 0 0 0 0 0 0 2 6 0 0 row1 = [(3, 3), (5,4)] row2 = [(3,5), (4,7)] row3 = [] row4 = [(2,2), (3,6)] valuecolumn