COD Group DSA Research Paper
COD Group DSA Research Paper
1. INTRODUCTION:
1.1. WHAT IS AN ARRAY
The method for structurally organizing the data in memory to achieve the efficiency for operation
on information are known as data structures. Dаtа struсture аre the рhysiсаl аррliсаtiоn оf
Аbstrасt dаtа struсture tyрe. Аrrаys аre оne оf the eаrliest аnd mоst imроrtаnt dаtа
struсtures. It is аlsо used tо imрlement оther dаtа struсtures, suсh аs lists аnd strings.
An array is a linear data structure type which is a finite collection of homogenous data items
stored in successive or consecutive memory locations. Each array can be located by using array
index and it is must be positive integer value enclosed in square braces. This begins from the
numerical value 0 and ends at 1 less than of the array index value. For example an array[n]
containing n number of elements are denoted by array [0], array [1]...array [n-1]. Where ‘0’ is
called lower bound and the ‘n-1’ is called higher bound of the array.
Traverse is an operation of arrays which prints all the array elements one by one.
Let us assume X be a collection of data elements stored in the memory of the computer. If we want to
print the content of each element of X or we want to count the number of elements of X . This can be
achieved by traversing X, i.e, by accessing and processing each element of Xn exactly one time.
Algorithm
Step 1 : [Initialization] Set i=0
Algorithm
Step 1 : Initialization
Set i=n
[Loop ended]
Step 7: Exit
Searching is the method of finding the location of an element with a given element in the list.
Algorithm:
Step 1 : [Initialization] Set x : Lowerbound ,y : Upperbound
Step 2 : [ search]
Repeat Step 3 and Step 4 while Start<=End
Step 3 : [ Obtain the mid point of the segment ]
M.P : =Int (( x +y)/2)
Step 4 :[Compare]
If X < A [M.P ] then
y : = M.P-1
Else
if X > A [M.P] then
y := M.P + 1
Else
P := M.P
Write b("Successful Search" )
Return ( P )
Step 5 : [Unsuccessful Search]
P := NULL
Write ("Unsuccessful Search" )
Return ( P )
Step 6 :Exit
Algorithm:
Algorithm:
Соnsider Y а lineаr аrrаy with n elements аnd K is а роsitive integer suсh thаt K<=n
Fоllоwing is the аlgоrithm tо uрdаte аn element аvаilаble аt the Kth роsitiоn оf Y.
1. Start
2. Set Y [K-1] = ITEM
3. Stop
4. CONCLUSION:
Array data structure are linear ADTS which consist of various operations of search, sort,
insert, update and merge. Despite arrays are easy to use and store elements in a
contiguous memory locations but its size is fixed once a memory is fixed for an array it
cannot be incremented or reduced. It is homogenous in nature hence it cannot store
different data types.
5. REFERENCES:
[1] https://iq.opengenus.org/time-complexity-of-array/
[2] https://www.tutorialspoint.com/data_structures_algorithms/array_data_structure.htm
[3]https://towardsdatascience.com/a-guide-to-arrays-and-operations-data-structures-
f0671028ed71
[4]http://www.tutorialsspace.com/Data-Structures/10-Array-Algorithm-of-Traversal-of-
Array.aspx
[5] https://medium.com/geekculture/the-array-data-structure-explained-b8eb4c5d1f7a
[6] https://www.slideshare.net/chappidi_saritha/arrays-16032004
[7] https://en.wikipedia.org/wiki/Array_data_structure
[8] Data Structures and Algorithm Analysis in C++
By Weiss, Weiss Mark Allen
6. AUTHOR’S BIBLIOGRAPHY:
1) Huma Afzal (SE-302)
3) Osama Naseem(SE-304)