Download as pdf or txt
Download as pdf or txt
You are on page 1of 25

CLASSTIME Page No.

Date
L

i-0i<n fe t) On)
x f-0 nf-1+2)- o[n) (
1-f1;- ) Ofn
Aoer (1iikns f-*2) (loa,n)
o r t L kn; i=tt3) 0 Jog,n
or(-A 171 f=/2) - 0n,n
1

le(fen)- ntl

Stat -

asl tuil+ewtnote
hle (as b) 2x2
22 22 ab
Stt 2 Q

Q0f2 b

le loq,b

of Jaan
sSTIME Page No,
Date

Ale(ml=n) T 2
2 2

t (m>n)
2
ee 2
n -m 2
2 2

not- O(M)

Hgothm lest [n)


(ns)

8euk cae- D[
Qbe

ph(0,)) -n
CLASSTIME Page No.
Date

s e constowts
D ) -onstat time
of Joqn)-Jagatthw

o(*)uadatic
0(n)
O)- ekome»tial

AsyaphoHo Notakfns
O blg-ok ppen bewnd
g-omega loen twd
aurtbage bond

Bf-oh
Tke tkan

Such o t d)< c*9(n) tn7M

)
n - O(m)
CLASSTIME Page No.
Date

Omega

such tuak n ) 9n) 4 n2n

dln)=nts
An+3 1 xn
11
d)
n) ()

weta Notolfm
The tuntkt
Suth that

n)=2nt 3

11
CLaSSTE /Page No.
Date

f(m)
)n nx/m-)(n-2).. 3x2x1
IXIKIX Ix2x3X xn Axnxnn
1 S n l Sn'

o) S2(1)

Jq(1xIR 1) Jog(r213.. )slog(n. M)


IS loq (n) Aoqn

Iropentiesot tumptoktc Notafems


Ctnena Paopertes
n) 0lgtm)) *um a ) s ol1)
holds aue tor o s uel).
CLASSTIME PageNo.
Date

niokiems
x0mste
-
Tyue dov all

4 )0lm) amd.an) {s e o/h


thon n) 0[hn))

n s 0/) Oud
hen n s 0/)

1)-n aud n)=n


g) 9(nt)

&mwmetiR ne for 0 0Md J

hen 1s 0) 3wd)=2
aMd
CLASSTIME Page No
Date

) - OLam))
0Md oleln))
+dn)-0 masln, elm)
dn)= n= oln)
gn) 0(n)

=0g[ni)
0und d=0en)

Jogab Joga+Jogb
Jog -Joy 0-Jogb
Joga Jga

a hen b=Joq
a
CLASSTIME Page
Date

tstwostaMd orage cOe 0naljafs

Linean Seantk

A 3 e5AaLúEnIg
3 o2 1 6189
Beat case- enthie key eltmet
poestnt or Phst tndex
Best ase me B(M)-ot)

Dorst ce seancing a
R bentr
at lasf fndex
woxt Caue tme Ww)o)
tveage
tveoge cose agusstble casg tine
MG oCases
tug. Hme 14243t.. t =

A) o(n)
CLASSTIME Page No.
Date

B()-1 n) =
8/n)o(1) (M)= ofm)
Bl)=2[ wn)= (n)
wn) (n)

20

Best case- 88ting 0ok element


Best case wMe B(n)L
Wost ca-seAks to ea lemes
woot Ae me WM) =Juon
Mtn Wn)=
Jogn
max n)= n 2 o0 letskewed
BST
Acfentseks

Fhad
2 Uutev

SE2,,4
SS,6,,8
S
-
(3
Cs)
SUS 22,4,S6,1,

0-
( - P a n e M

. Jhilo

T(
atbody ddd
Hisop, is
Mens Hh aUcle
T(M
pcn
CLASSTIME Page No.
Date

e Dde
omd COqutt

DAC()

S(e)
ese
Wde uto f, f2?
Aply DAGU), DAC[
a Re DAC[P,), DACC),)

(tt n) Tut(8)
T)ved Tst
Test (2
Tt(1)
ofnktd,n)>
tn-1) 1 Testa)
Mtlcallb 0()
exeuk8

T T(r1tl
T void. Test [tn)
fms T(n)
A- Tn-2)- -2
rt-oten itat)
n-2 Ttn-3) -

1- T2) -2
0+142..M-tAn
TU)

Ttr Tn-) +na2 To-


Tm TM-1)n
Tn)
Bat a t k h
7(A). o

Tn)Tn-1) +n
Tn-) Tn-) +n-
T (T-)+n-1]t n
TI)T-2)+ (n-1) tn
T(1-2) T/n-3)+ n-2

T=[ T(M-s)+ (n-2)+]ttr-)+n


Tn) T-3)[-2)4 (r-)
T(-k)+ (n-()+ (n-lk2)4 t
Ttn)
tne n-0

TTnn)+[n-[n-l))+ |-())t.t|hi
T[n)= o)+ lt2t34.tn-1)tn_
Tln)= ltnntl)

veld Test ( n) T)

u81)3-
Tn-1

Tn)=
T[m-1)tAn >0
. t{nl) 4% CLASSTIME Page Ho.
Date

T
Tn-)

Jag (n) T(-2)


Jog(m-2) T()
Tu)
Jo Ty
Tio

Jgnt logf-l)t tJa[)t a(

- Jog
O/nSogn)
Ten)- Th-)t on)
Tn)= Tn-) tn
Tn)=Tin-1) +Jogn M Jagn)
Tn)= Tln-l) t v2
Tn)= Tn-1) 4 4 -ofn)
T) T(n-l0o) t n - o()
CLASSTIME Page No.
Date

MosHeh 1keoxum ox Deureasth Fuuen

Tn) T(M-1)+|
Tn) 3T[n-1)+
T[n-)+n On2)
Tn)= T(n-+1-

Ttn)= aTln-b)+
a0,0 ad an) 0( here k>o

(EI)07 0(*in)2
O(na)
oT) 0(m))
Diudi Fmcfona
MgotAm 1st (fat n) T)

et /2) Tm)
TM=T[mh)t
T) TW2)t 1

T
T(n(2
1 1
Ty:)
K steps T/2) 1

TIM

n) T(w2)+ \

To)= [T[m/22)t1)
T)= T(2)+3

Tn)- T[at) + k
CLASSTIME Page No.
Date

Asume * 1

J0q,

T()= T(IY t A,
TI1)514lon

T)tmp)A _M24

Tn)
T
M )

T
M
Tn 1
T Toa nA2-1
TM)= ml
TM)=
of
CL STIME Page No,
Date

Tn)-Thle)tn
T(a)-)+Mp]+
Tm-TMl+2+n
Tm) *
2

nea d kJ0an

ak2

Tt TIl)tn
M n
Assume
toqn
nk
a0/wMogvn)

mckibns
DWdg
Masta 7heorem
Y

)=aTlm/b)+ dn) B(1Jon


d n) R)
a - , bL

Case 1 Roga 7k e n b (
OCpon)
Case2 lon a k
- eloglagn)

Obe3 log Jba <k pzo Lon

T( T[W2)+1
b 2

Cose1: x )
9lon)
Hhan
S gt a x e d

ese
t
ASS 2
S
key-2
ndds

1S

widto

wid=
alse

4CauAqasdsms se
gtnseoMth A,Y,ky)

ile (sh)s
wd=th 1N)

Rhu
key A[m)
CLASSTIME Page No.
Date
L

ais h = mld-1

else
=fdtl

LeCAe
Jogn-gn

Hoo fstueetch (h,ke


l=k)
h{A]:=key) 4
lse

wid M/2
k Afmad])
key Awid1)
hyo RBseoMth (A,wdd- key)
M)de h n FiRASeonuh daDyaid+, h,y )
CLASSTIM P2ge o,
Date

M-1

T(n)
TI)+1

Heap wgleke L
tolod
ua
a ade at tdex-
let uild ot-2tt
k oteut&-
a

spl30
2
jelc elEC
23 S 6

S
CLASSTIME Page No
Date

ABCT
12 1 7

+ohod no-o nodes

Kes Mo heop

(30
30

Sp30 2sllo 8 | |to fyua0U)


2 S 8
-Olog)

HGo Sollol3o tol St7


1 S S C18
20 1
lolLs ola
23

16
n a nox heo, y 4
ale delettg
fs Nable
delakan 4 0ot

30)

3o16
2
islo
S6
Max Htme olan

Htap Seyt
4 Rake a heop
do
2 to delkk the aleMeuk ema keaf
1of2lisl3olo

(10
CLASSTIME Page No.
Date

30

to T-orlag
tol 30ls lo 2
1 31

12
23 SS 2 3

You might also like