0 ratings0% found this document useful (0 votes) 131 views8 pagesData Structure Handwritten Notes
Copyright
© © All Rights Reserved
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
SPSWWWVLOUOUULUUUU Ed ddddd ddd ddd dle
What is Data strurure?
9 Data can be arranged $n 4 many ways, logieal o*
Morhematical Gyrangement of a dara } coved fara Stvucture
Examptes: Array , linkediist, stack , Queue , Tree Graph
and many more.
lavhat is qn Algorithms)
> Sequenee oF steps Performed on the dota using efficlent
dota structures t0 solve g given Problem -
Example: Seyting an Array -
CLASSIFICATION OF DATA STRUCTURE
DATA sTRuctuRe.
Baas
Cint, Float, string)
ATUC KUMAR CUNKEDIA )ALATA Cede ULL
Types of Dara Stvuctures
a Pameve and alon- Primitive Jatq strurure
& Stotlc and Dynamle Dato structure
ce Feysistent and ephmerval fora Stvutture
n- Primitive Further Divided Poxcistent Further Divided
two Types. info three tupes-
Unear Data Structure i) ral Persistent
Hi). nlon- Linear Data Struttuye ii)-Funy Revsistent
iii). Confluently Persistent
Dara struuuse Operations :
The fortowsing four operations Ploy 4 major role
cofrraversing Accessing each retord exactly once so that
certoin items In the xetord may be processed.
(2). Finding the location of the yewrd with q
given Key value.
(3)-[Treerting *] Aading a nei yUcord to the structure .
wr[Dereting ¢] Removing 4 yacord from rhe styucture -
(sr [merging§] Combining the yecords In two different
sorted Files injo a single sorted file.
Frrvanging tne record in some jogital order
Example > Alphabstically according fo some
NAME Key ov In Numerical oYder according
+o some NUMBER Keys
ATUL KUMAR C(MNKEDIN,fee
DIV URRUNU ddd ddddd de’
Searening Algorithms :
Searth algorithms ts aq step - by - step procedure
40 locate spetFic data among coneurion of data.
Types OF earth Algovithms With the wmplex
): [nar a
A Unear search or Sequential search
iS q method for Finding an element within a list +
Tt is sequentiany eheuxs each element of tne list unt)
@ marth js found or thy Whole ist hac been searched.
ae Complexity OF Mneay Search -
2). [Binary Searth :
In Binary Search approach the
element }5 aluoys searthed tn the midale of @ portion
oF an aytay -
inary searth can be Ymplemented only on a stored
tor of Items:
IF the aement ave not sorted alveady , we
need +0 sort thom First «
men Complexity of
Binary search.Array is 9 Type of linegy Dara structure GR)
Array Js a conection of more than one data bur
ML tht data items are same data types, J stored
that data Inq tompurer In a twontigous memory
location -
]
2\s fale]
VY
1 Bytes = g bit
Memory is a tong top of Bytes
Types oF Arrey g
©
The array With Only sudscript
thet array js called as One Dimentfonal Array.
Example: tnt a (S}G¢— Subscript.
senate
[Wo Dimentionar Array‘
€ arvoy wl to subserlpt
thot array ts colied as Tuo Dimentlonad Arroay-
Example: int ats] (5}¢—— Subscript
® Muitt- Dimenhona) firroy *
The array volth more than
4100 Subscript thot array \s Calked as Mult -Dimentonol
Arvos . af
SGN UUM WU dtd ddd dd lbh eeSVL ddd dd heter
Unked Uist Fs @ Near Data structure. }t is also a
Conection of more than one data Items of a disimilar
dota type Nice avyoy bur it can not stored it In
tontiques memory Jotation . Tt can be stored
Tandomiy In a main memory
fo thot inkedlist tontains ¢wo Part one
For Dota and ceond part for tre frddyess of tr next
dota element.
Dota element SS Hadress
Types of linked list
0 [eggs 1
200 Joo
—- l=
100 200
—— BE Et HE}
200 300
CMP Doubly ctrewiay wWnked iists¢
SMV UUOUUUUUUUU Ub dtd dddddded?
A stauc fs a ist of elements In which an elements may
be Tnserted or deleted only at one end called the 10P
oF the stack,
Stauc oF dishes
Push ——> Thsert elements into stack
Delete elements from stack <—— (ro?
A Queve is a linear jist of elements In Wnith deletions
Can TaKe Plage OMly ot One end Caued front and insertons
can foe plow only at the orher end Called tht year -
ATUL KUMAR CUNKEDIA)SSW DLDOULUUUU EU dddddddddddd dh tle
Trees are non- iingay data styuuure
Where dara are stored
by dato containing a hierayeical yelationship b/s elements:
A binary tree t+ 1s defined as a Finite ser oF elements
Cored nodes
Trave Binary Trees
There ard thre Ways oF
traversing a binary fret T with yeot R.
1). Process the root R
2). Traverse the Leet
Sudoryee of R in
Preorder
2) Traverse tht
Rignt subtree \n
preorder
ATUC IComAR
0. Trdwerse Lert
SUbSTT LL
2). Process Trt
yoot R
3). Traverse Rant
Substra
Postorder
1): Traverse tert
SUbSTYRE
2). Tyaverse Rignr
SUdsTYR
3). Process tre
yoot R.Groph 3s @ collectlon of two set y and E uphere ,
V —— > vertites/ nodes
€ ——> Edges
Graph 9S q moathematleal sprucrures thar represent
Par Wise yelationship berdeen Objeus Where nodes
ar2 conneued wlrh edges
Verrec 1s nothing bur me dora element
wonich Ys also Known qs Nodes
——> Edge is @ tonnttrion Iink berdeen
4000 Vertes
Representarion of th gyaph
A) Asjacenay Marvy
Fidjaceny Uist
* ATUL KemAk (UNke DIN,
WNVNNVUUUUUUUUUU UU Cd ddddd leery