SlideShare a Scribd company logo
1 of 18
Array
Arnab Gain
Assistant Professor
CSE
Array: What is?
• Arrays a kind of data structure that can store a fixed-size sequential
collection of elements of the same type.
• In computing, row-major order and column-major order describe
methods for arranging multidimensional arrays in linear storage such
as memory
Row-major Order vs Column-major Order
Basic Operations of An Array
• Following are the basic operations supported by an array.
• Traverse − print all the array elements one by one.
• Insertion − add an element at given index.
• Deletion − delete an element at given index.
• Search − search an element using given index or by value.
• Update − update an element at given index.
Sparse Matrix
• a sparse matrix is a matrix in which most of the elements are zero
• The number of zero-valued elements divided by the total number of
elements (e.g., m × n for an m × n matrix) is called the sparsity of the
matrix
Triplet Representation (Array Representation)
12/27/2023
• Considers non-zero values
• the 0th row stores the total number of rows, total number of columns
and the total number of non-zero values in the sparse matrix
Array Representation of Polynomial
• A polynomial is an expression that contains more than two terms.
• A term is made up of coefficient and exponent.
• An example of polynomial is
• P(x) = 4x3+6x2+7x+9
• Array representation assumes that the exponents of the given
expression are arranged from 0 to the highest value (degree)
• The coefficients of the respective exponent are placed at an
appropriate index in the array.
Array Representation of Polynomial(Contd.)
• The array representation for the above polynomial expression is given
below:
Array Representation of Polynomial(Contd.)
• Consider a polynomial with two variables: 2x2+5xy+y2.
Polynomial Addition using Array
• The steps to add the polynomials are listed below.
• First identify the highest degree polynomial. The degree of the
resultant polynomial is same as the polynomial with the highest
degree.
• Store the coefficient in the index specified by the exponents of the
polynomial.
• Add the coefficients stored in one array with the corresponding index
positions in the other array and store the result in the same index
position in the resultant array.
Polynomial Addition using Array
MCQ
• Who coined the term Sparse Matrix?
a) Harry Markowitz
b) James Sylvester
c) Chris Messina
d) Arthur Cayley
12/27/2023
MCQ: Answer
• Answer: a
Explanation: Harry Markowitz coined the term Sparse Matrix. James Sylvester
coined the term Matrix. Chris Messina coined the term Hashtag and Arthur
Cayley developed the algebraic aspects of a matrix.
12/27/2023
MCQ
• x2+2x+1 is a polynomial of-
1.One variable
2.Two variable
3.Three variable
4.Four variable
MCQ: Answer
• Answer: 1
MCQ
• What is the relation between Sparsity and Density of a matrix?
a) Sparsity = 1 – Density
b) Sparsity = 1 + Density
c) Sparsity = Density*Total number of elements
d) Sparsity = Density/Total number of elements
12/27/2023
MCQ: Answer
• [Answer: a]
12/27/2023
Array.....it also help full all ECE department students.

More Related Content

Similar to Array.....it also help full all ECE department students.

Similar to Array.....it also help full all ECE department students. (20)

DS Module1 (1).pptx
DS Module1 (1).pptxDS Module1 (1).pptx
DS Module1 (1).pptx
 
Brief review on matrix Algebra for mathematical economics
Brief review on matrix Algebra for mathematical economicsBrief review on matrix Algebra for mathematical economics
Brief review on matrix Algebra for mathematical economics
 
Unit 4
Unit 4Unit 4
Unit 4
 
Applied Mathematics 3 Matrices.pdf
Applied Mathematics 3 Matrices.pdfApplied Mathematics 3 Matrices.pdf
Applied Mathematics 3 Matrices.pdf
 
Mat lab.pptx
Mat lab.pptxMat lab.pptx
Mat lab.pptx
 
Introduction to Business Mathematics
Introduction to Business MathematicsIntroduction to Business Mathematics
Introduction to Business Mathematics
 
Arrays In C++
Arrays In C++Arrays In C++
Arrays In C++
 
Arrays
ArraysArrays
Arrays
 
PPT Lecture 2.2.1 onn c++ data structures
PPT Lecture 2.2.1 onn c++ data structuresPPT Lecture 2.2.1 onn c++ data structures
PPT Lecture 2.2.1 onn c++ data structures
 
Arrays.pptx
Arrays.pptxArrays.pptx
Arrays.pptx
 
Matrix and its applications by mohammad imran
Matrix and its applications by mohammad imranMatrix and its applications by mohammad imran
Matrix and its applications by mohammad imran
 
Array ppt
Array pptArray ppt
Array ppt
 
Array.pdf
Array.pdfArray.pdf
Array.pdf
 
Array Presentation
Array PresentationArray Presentation
Array Presentation
 
1.Array and linklst definition
1.Array and linklst definition1.Array and linklst definition
1.Array and linklst definition
 
Linear Algebra presentation.pptx
Linear Algebra presentation.pptxLinear Algebra presentation.pptx
Linear Algebra presentation.pptx
 
Arrays.pptx
Arrays.pptxArrays.pptx
Arrays.pptx
 
arrayppt.pptx
arrayppt.pptxarrayppt.pptx
arrayppt.pptx
 
cluod.pdf
cluod.pdfcluod.pdf
cluod.pdf
 
Arrays
ArraysArrays
Arrays
 

Recently uploaded

DeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakesDeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakesMayuraD1
 
Introduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaIntroduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaOmar Fathy
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . pptDineshKumar4165
 
Hostel management system project report..pdf
Hostel management system project report..pdfHostel management system project report..pdf
Hostel management system project report..pdfKamal Acharya
 
Digital Communication Essentials: DPCM, DM, and ADM .pptx
Digital Communication Essentials: DPCM, DM, and ADM .pptxDigital Communication Essentials: DPCM, DM, and ADM .pptx
Digital Communication Essentials: DPCM, DM, and ADM .pptxpritamlangde
 
Theory of Time 2024 (Universal Theory for Everything)
Theory of Time 2024 (Universal Theory for Everything)Theory of Time 2024 (Universal Theory for Everything)
Theory of Time 2024 (Universal Theory for Everything)Ramkumar k
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayEpec Engineered Technologies
 
DC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equationDC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equationBhangaleSonal
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfJiananWang21
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTbhaskargani46
 
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptxA CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptxmaisarahman1
 
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...Amil baba
 
AIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech studentsAIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech studentsvanyagupta248
 
Online electricity billing project report..pdf
Online electricity billing project report..pdfOnline electricity billing project report..pdf
Online electricity billing project report..pdfKamal Acharya
 
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
COST-EFFETIVE  and Energy Efficient BUILDINGS ptxCOST-EFFETIVE  and Energy Efficient BUILDINGS ptx
COST-EFFETIVE and Energy Efficient BUILDINGS ptxJIT KUMAR GUPTA
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VDineshKumar4165
 
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...drmkjayanthikannan
 
Design For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startDesign For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startQuintin Balsdon
 
Moment Distribution Method For Btech Civil
Moment Distribution Method For Btech CivilMoment Distribution Method For Btech Civil
Moment Distribution Method For Btech CivilVinayVitekari
 

Recently uploaded (20)

DeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakesDeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakes
 
Introduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaIntroduction to Serverless with AWS Lambda
Introduction to Serverless with AWS Lambda
 
Integrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - NeometrixIntegrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - Neometrix
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . ppt
 
Hostel management system project report..pdf
Hostel management system project report..pdfHostel management system project report..pdf
Hostel management system project report..pdf
 
Digital Communication Essentials: DPCM, DM, and ADM .pptx
Digital Communication Essentials: DPCM, DM, and ADM .pptxDigital Communication Essentials: DPCM, DM, and ADM .pptx
Digital Communication Essentials: DPCM, DM, and ADM .pptx
 
Theory of Time 2024 (Universal Theory for Everything)
Theory of Time 2024 (Universal Theory for Everything)Theory of Time 2024 (Universal Theory for Everything)
Theory of Time 2024 (Universal Theory for Everything)
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power Play
 
DC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equationDC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equation
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdf
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPT
 
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptxA CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
 
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
 
AIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech studentsAIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech students
 
Online electricity billing project report..pdf
Online electricity billing project report..pdfOnline electricity billing project report..pdf
Online electricity billing project report..pdf
 
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
COST-EFFETIVE  and Energy Efficient BUILDINGS ptxCOST-EFFETIVE  and Energy Efficient BUILDINGS ptx
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - V
 
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
 
Design For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startDesign For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the start
 
Moment Distribution Method For Btech Civil
Moment Distribution Method For Btech CivilMoment Distribution Method For Btech Civil
Moment Distribution Method For Btech Civil
 

Array.....it also help full all ECE department students.

  • 2. Array: What is? • Arrays a kind of data structure that can store a fixed-size sequential collection of elements of the same type. • In computing, row-major order and column-major order describe methods for arranging multidimensional arrays in linear storage such as memory
  • 3. Row-major Order vs Column-major Order
  • 4. Basic Operations of An Array • Following are the basic operations supported by an array. • Traverse − print all the array elements one by one. • Insertion − add an element at given index. • Deletion − delete an element at given index. • Search − search an element using given index or by value. • Update − update an element at given index.
  • 5. Sparse Matrix • a sparse matrix is a matrix in which most of the elements are zero • The number of zero-valued elements divided by the total number of elements (e.g., m × n for an m × n matrix) is called the sparsity of the matrix
  • 6. Triplet Representation (Array Representation) 12/27/2023 • Considers non-zero values • the 0th row stores the total number of rows, total number of columns and the total number of non-zero values in the sparse matrix
  • 7. Array Representation of Polynomial • A polynomial is an expression that contains more than two terms. • A term is made up of coefficient and exponent. • An example of polynomial is • P(x) = 4x3+6x2+7x+9 • Array representation assumes that the exponents of the given expression are arranged from 0 to the highest value (degree) • The coefficients of the respective exponent are placed at an appropriate index in the array.
  • 8. Array Representation of Polynomial(Contd.) • The array representation for the above polynomial expression is given below:
  • 9. Array Representation of Polynomial(Contd.) • Consider a polynomial with two variables: 2x2+5xy+y2.
  • 10. Polynomial Addition using Array • The steps to add the polynomials are listed below. • First identify the highest degree polynomial. The degree of the resultant polynomial is same as the polynomial with the highest degree. • Store the coefficient in the index specified by the exponents of the polynomial. • Add the coefficients stored in one array with the corresponding index positions in the other array and store the result in the same index position in the resultant array.
  • 12. MCQ • Who coined the term Sparse Matrix? a) Harry Markowitz b) James Sylvester c) Chris Messina d) Arthur Cayley 12/27/2023
  • 13. MCQ: Answer • Answer: a Explanation: Harry Markowitz coined the term Sparse Matrix. James Sylvester coined the term Matrix. Chris Messina coined the term Hashtag and Arthur Cayley developed the algebraic aspects of a matrix. 12/27/2023
  • 14. MCQ • x2+2x+1 is a polynomial of- 1.One variable 2.Two variable 3.Three variable 4.Four variable
  • 16. MCQ • What is the relation between Sparsity and Density of a matrix? a) Sparsity = 1 – Density b) Sparsity = 1 + Density c) Sparsity = Density*Total number of elements d) Sparsity = Density/Total number of elements 12/27/2023
  • 17. MCQ: Answer • [Answer: a] 12/27/2023