0% found this document useful (0 votes)
11 views4 pages

List Using Arrays

The document discusses the characteristics and operations of multi-dimensional arrays and abstract data types (ADTs). It highlights the advantages and disadvantages of using arrays, including constant access and preallocation issues. Additionally, it covers various data structures such as stacks, linked lists, and dictionaries, along with their operational complexities.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views4 pages

List Using Arrays

The document discusses the characteristics and operations of multi-dimensional arrays and abstract data types (ADTs). It highlights the advantages and disadvantages of using arrays, including constant access and preallocation issues. Additionally, it covers various data structures such as stacks, linked lists, and dictionaries, along with their operational complexities.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

) Ama)

Ohe dimgnciomal a r )
1oo:
6o, 9",4p, 9°,
3°,
-int an Cao =0, 20, 2 byte
of

Pf/%", ar ):

30
K
Sta ti
iic
ei sh x e d
+2));>
PÉ("%d a r m ) ); ’ 1 0 o 4

e ’ r e f e r e nc e a d t r s .
drej
valeat ad
refesence

’ de
oU) tne
element ar 5)
)
loo0+ (s - o) x
We iadeaing
need
herefore, no

) Dl0 sizcof
BA+(- b) *element
)he-dimehtional Anra:)
arr6 4, J . 4

Rns Major ovder

raol

1e00 [(4-)*% +(3-1) *2


3
=) J0o0 t
Cons tan t

n-tolumng
h-hos
order
b,-uba. ’ Ras major

L(AIGo) BA +
C- Siee fan
element

to wse.
Adantages:) () siple and easg (coutant access)
to the elenents
( ) fater accs
needed mer
Dis advantajs) (i Preallocates al

(ii) one Conh'nuns block Jued


Couty
(iy insehhg an element at hrst 's
Abshract Data type:)
de) tuppovt
(int, Aoat,
pinhe data types subhrachi
a s , a d d i h o n andJ
perah'ons Auth hese
bie mplementahinof

provides tte
The Aystem
primihe data tyres gperati
shuctuhe i h their
He data )
’ We (obi'ae
(obihe
Abchract Data Types (ADTs
and we Cal the
A amplementahon of H
bothenhg abmt the
hoat Hhen.
Can ti liee
perah'ons,
queues, Binaytee,
examplei- unked List, stack,
5for Dictionaies, ctc.
pushC)
Stack LIFO

find. elemenk)

Ust ADT

fndkh ’ o ) (onitant bme:


prhti'st ’ oln) lhear t'ne
posiho
Tnsexhon dnd delekq depends upon Phe
( )delebng aat ohich pesfonng tese operahiny.
we ane
fiteleMent
Inserbng at posibon "o"c 6st
prsihon
empty .
d's
best tase ’ Costant oa) ’ t
hjorst case 0(n) ’ist a's fuy kuled.
()

-4oal Blumbet

pertorned.

Sitahm shere h 'st s bult p by dnsehiong


he ay acce (ie,
then aby a
He high end,and

t suitable plementathon.

dele tiony cur hghnt


hierbnu and
it hsehny
if
HaseeI, ophn.
’ ds not a 4 go0d
he a
Hhe ist, Hhen the best phnfr tha
ked istu's

atis uyed foY


) Ddehhg of ag elenent fron an a y
'st plennentahon
need to maintah lengthof e aty
size fthe aay.

) eg Krst elenent ten,.


-
for n- hheg an
ACI Ai41];
ahay
(n-1)
Dyname Aay Auscahon)

) nalloc(Bieoflint) *s) elcrt


int xpBr (h
in Ctt,
Aree (tt)
nes int [size];
delete C] phe; delete ptr; for kiyle dojects.

You might also like