Professional Documents
Culture Documents
Example :
• A linear array named as DATA consisting of six elements:
Reference: Chapter 3 Seymour Lipschutz, Schaum's Outlines Series Data structures TMH
Arrays
Example :
• An automobile company uses an array AUTO to record the number of auto mobile sold each year
from 1932 through 1984.
• AUTO[k] = Number of auto mobiles sold in the year K
• Lower Bound = 1932
• Upper Bound = 1984
• Length = UB – LB+1 = 1984 – 1930+1 =55
Representation of linear array in memory
Reference: http://www.xpode.com/ShowArticle.aspx?
ArticleId=137http://www.xpode.com/ShowArticle.aspx?ArticleId=137
Arrays Traversing
Traversing is a process to print the each element of an array . This can be accomplished by
traversing an array, That is, by accessing and processing (visiting) each element of an array
exactly once.
Algorithm 2.3: Given DATA is a linear array with lower bound LB and upper bound UB . This
algorithm traverses DATA applying an operation PROCESS to each element of DATA.
• Set K:=LB.
• Repeat step 3 and 4 while k<=UB;
• Apply PROCESS to DATA[K]
• Set :=K+1
• Exit
Array Insertion
Reference: https://www.geeksforgeeks.org/self-
referential-structures/
Polynomial
• A polynomial p(x) is the expression in variable x which is in the form (axn + bxn-1 + …. + jx+ k),
where a, b, c …., k are real numbers and 'n' is non negative integer, which is called the degree of
polynomial.
• An essential characteristic of the polynomial is that each term in the polynomial expression
consists of two parts:
• coefficient
• exponent
Polynomial
Example:
• 10x2 + 26x, here 10 and 26 are coefficients
and 2, 1 is its exponential value.
• The sign of each coefficient and exponent is
stored within the coefficient and the exponent
itself
Reference: https://www.w3schools.in/data-
structures-tutorial/polynomials-using-linked-list-and-
arrays/
ARRAY APPLICATIONS
• Arrays are used to implement mathematical vectors and matrices
• it is used in rectangular tables,databases consist of one-dimensional arrays .
• Arrays are used to implement other data structures, like lists, heaps, hash tables, deques, queues
and stacks.
REFERENCES
Reference Books:
• Seymour Lipschutz, Schaum's Outlines Series Data structures TMH
• Introduction to Data Structures Applications, Trembley&Soreson, Second Edition, Pearson Education
Reference websites:
• https://www.tutorialspoint.com/data_structures_algorithms/array_data_structure.htm
• https://www.tutorialspoint.com/data_structures_algorithms/array_data_structure.htm
THANK YOU
For queries
Email: gurpreetkaur.uic@cumail.in