Professional Documents
Culture Documents
Jan 19,2023
AGENDA
Friday so Jan 9p
Y
optionalclass
Subarrays
Repeat
What are 2D Arrays Matrices
away of integers
fhello
G this
is
Mei
arr
1 IT
5
92,112,57
an Co2 i 0,33
an Co Co2 1
an 11122 9
an CIT IT a O
ar OJ IT O
Mat o I 2 3 4 2DArray
0 2 dimensional
I
2
3
um
mat.su
matC2TC
matC3JCo3
0 Mcolumns
jogged
o Co Ma
I
bij
2 2j
a
it p
Nti Q im D
N 1,0 q
Questions
j
i 15
15
17
f NXM 3 4
Arri 4,3 1,77 6 2 3,47 5,3 2,77
sum O
sumt matlilli
S.c old
sum
print
Q Given mat NIEM find the cot wise sum
15 8 6 18
first
to'Étiotjing
I
pMfÉo i nite
sumt anfiles
3
3 printesum
0 I 2 3
o
I
2
3
4 4
Main
go C D Gn did i
And
0,3 1,2 2,1 3,0 in
itis
IF I N 2
E
L
3 N D
J
i matfild
forlinti orieniitt
while in 22
jan
7157
print mate
itt
jet
3
It o j N l
while i N
2257 0
mafijw
mat NIEMI
I Given a print all diagonals
CL R
Gentry
o NXM matrix
260 G 1 I
no
o 2,11 213.2 of
diagonals
ooo CD 2 4,33
CO D 42 633 3 4 11
2 1,3 2,47 43,57 Ntm I
did 4,4 Gs
6,4 4,57
ED
Observations
I
while ien 22 jam
IS print matlin D
itt
jet
if r o
Breath
10 53
r
else
cat TL O Inam
3 S.c Old
Q Given a mat N ncalculate transpose of
the matrix with S.c Old
0 I 2 3 4
0
1 6 11 16 21
2 7
2 3 8 13 18
49 in
Ey
3 a
g y
math Co matCold
mat 6393 maths
Swap matfixsematGT.li
O
int i 0 ioniitt
for
for int jeo janistt
Ilswap matti j
ÉI
mat Colli
temps matches
Matti 57 matCJTC
É y
matchcin temp
Iid
a
to.int oiianies
Jet
TC O NY forcintisIII
is
i
iz
or
is
1
in Either iterate in lower triangle
or upper triangle
but not both
D Dimensions
change
D
for rectangular
matrix
Interviewquestion
JRotated
by
go
Transpose Gcn
0 I 2 3 4
0 11 16 21
1 6
ÉÉ
I 2 7 12 17 22 Reverse
2 3 8 13 18 23
3 4 9 14 19 24
4 5 10 15 20 25
T C O N N2 O 2ND
O NY
How to reverse a row
matitrow
I
Reverse the
away using swapping
x x
Doubts
col sire is
7 same for all
D rows
rt
13H 3 260
prefix
A7
spit