L8
Array Problem Solving
For Discord email - support@[Link]
Find smallest and second smallest in Array
minE-aulos :
Cruise
Explanation Slide
o
↓
↓ ↓ ↓
8 10 33 17
12 25 >S
minE 8
-I
mi n
e i
=
min E
SminEz
SminEz10
= -
tuli
site
minE cli
Reverse an array
pointe + 62
2 3
↑ ↑g
S
while 32
of
swap (an (i) ,
an
(j)
i2 it1 ,
j2j =
-
3 261 S
-
temp
b
a
2
z
2b
temp
a
&
↑
S
O
S # E * Es
-
7 6 I
2
3
↑ ↑
j
iI Swap (anli] ,
an
/j]) ↑
icie
j =
j -
1
#20 1s
Given a sorted array find it’s median
N26 F tezis
inc/dec odd >
- 3
-
I
Move Zeros [Leetcode]
t Ve
-
00
-
-
end
o
O 1234
3 os 0 1
331000
Two Explanation Slide
pointer
· 3
-
thisina
an(j) > o
·
S
01234 S
000
m
a
I
j
tre -
zew
anlj] > 0
anlisz anlg]
i + +
Practice and Homework Questions
Homework questions -
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
Thank You!
Please practice more questions and examples as above !!