We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 8
e [ Whar is Data Steucture 7]
Data can be arvanged ina many ways, logical
oY Mathematical arrangement OF a data is
Called Data Structure.
Examples:- Asvay , linkedlist, stack , Queue, Tree,
Graph, and many more -
°
SD Sequence of steps performed _on -the data using
efficient data structures 10 Solve a aiven _
problem -
Example t Soxting an Array.
Classification of Date StructureeI
a): | Pyimitlve and Non - Primite Data Structure.
b)- | Static and Dynamic Data Structure:
Q: Pexsistmt and ephmeral Data Structure.
Non- Primitive Further Pessistent Fusth ev
Kiivided into tuo ty ees divided into thee
fl. [Linear Data Styucture _. | Pastially Pessistent
2) ied Dara Structure gj]. | Fully Persistent
3).[ConFluenty Persistent
pes
The Following, Four Operations Piey a major yole -
1). Traversing : Accessing each yecord exactly once
So that cextain items in the vecoyd May be processed:
Searching: Finding -the location of the xyecord with
a aiven key value -
Inserting +. Adding a new yecord 40 the stvuctuye
Deleting: Removing a record from the stvuctuye .
Mer9 ing Combining the vecords in two different
Sorted Files intoa Single soxted Files:
6). Soxting: Ayranging the yecord In same logical
order. Example :- Alphabetically accovding to _
Some NAME key ox in Numerical oder according
|ro_ Some NUMBER key.5 A Search algoyithms is a Step-by- Step procedure
Using to locate specific data among collection
of data.
OF Seaych algoxithms alth the Complexi
I)-_|Lineay Search? A lineay search or sequential
Search is @ method for Finding an element wlthin
@ \ist- It is Ser, checks each element oF
the list until @ match is found oy the whole
list has been seayched-
C(n)=n/2_]¢@——— Complexity of lIneax Seaych -
2): Binary Seavch : Th Binary seaych appyoach the
element is always searched in the middle oF a
portion of an array. Binayy seaxch can be
implemented only on a_1). _Cne Dimentlonal Avtay: The axvay with only
Subscript that array is called as One Dimentional
Axtay- i =
Example in
aaa aw Subscriet .
Two Dimentional Away: We axvay with two
Subscript that axvay is called a$ Two Dimentional
PLETOY,- “4
Example ix
2). _Multi-Dimentional Avvay: The qrray with move
than two subscript that axvay is called as
Multi - Dimentional Ayray.
Linked List is & ineay Data styuctuse. It is also
Collection ef more than ene data items of a
disimilay data type like ayyay but it_can not
stored tt in Contigues memory locaton .
Sure[tr can be stoved yandomly in a main memory.
co that linked 11st contains 4wo part one Cor
[Dara and second part fox the Address of the
next data element:
cacy STF sss
element
Tyres OF linked list
Singiylinked List + 4.
[star | SOR] : > 8 [Nutt_
200 300
Doubly ttnked |ist:
[afin 2a) eects! feo [3 [Nutt |
100
_ e200
Ciyculay \inked list:
[2 [2007 L3 [300] Eu roo}
100 200 00
Doubly Clyculay linked list:
Leela [200 [34 E [Seo] 1 |
a
e Stacks
SPA stack Is a list OF elements In vuthich
an elements may be Inserted or deleted
only at one end called the Top of the
SHOCK
Stack of dishes
Push —> Thsext elements Into stack
Delete elements From stack.