DSA Lab Assignment- 1
DSA Lab Assignment- 1
* Objectives
1.To 9desstaro Ara Dada type.
Q.Uhclerstand the appition of ttray as gpa(se
madiot:o
*Prablem.Sttement i
aA'- Implenext cpplicoion of arrany in spacse
matriedo perosm gimple &fasttsorspase.
oomesi
oF Complcn o! tis assignment
assignme hudeat
cwill eable o
easn 4 h e D esSa
Lecrn the applicadion Oo! CISayas SpacSe
Qn is incleKe) stoutig th O.
Lach elemet in is abcessel
thxough istuoindlea
chm ensionalariny
the simples) ocm a the
muioimention A/e Convisucize
C two - dìm pnsiona one-dimeatiar
arays stacked Verleal facming
tble th KowS
Cndoloun s.
lo Caecte a 2D array of int egerke
he falloing exongle
Roc Calumn
ROw
Ro w 9
6
Page No
Titiaize Matsid
Tensse Star
Deine 20 athir Dctetmind Matsie prntMatsie
psint
Teerate te
Crigina matoie pint
nati Vahee
Assingn the Grgs
Jpordi e kmerd fen!
origina) otrenspose.
Psiot
origino
matié
Pist Tronspose ralJ
mynotes
y Knouedoe ten
DA Lab -1
Prachical
QolProb lernstotemests Assigpment - Pege No
A Implement
matrie to applicadiod ofof
perform simple
Aray spatoe.
ane
(Fast transpose) transpase
Toplemen Application o ar in polynomial
etpreSsion
Salian'
A.Tmatrice
apleomend toapplication
perfocrm
of Acroyspase.
CFast Tons pose) Simpleand trons pase
Publie clas
impleTranspase
public static Voicl main (sting II
iot CJCJ matrie
=L,24,3, 43
int sosS = matrin .lengthi
int cols = matris LoT. Jength
int IJCI transpasedmatrik =new intCcols Itoua
osCint i:0; isfows;i)
fes Cintj=oi j<cols j+)
tsansposed iatrie LiJCJ:matrir C:I]i
3
Systern. out. println "Origin a Matrim:";
print atrir Cnadria);
mynctes
My Knowiedge tank
Dats: I
Page No
Outputi
Origincl matric
2
5 6
TTaasposed
3 5
matie:
2
mynotes
Activities O Terminal
mca01cOmca01-1neentre-n
Comglek
ulidl24
TiHle: Acsasy. Oao AADT'
Psoblem stetemend:
2 Impleet appicedion ef
palynomial etpresson.
Olbjecives:
To undes stcund cror Dote yee
he
io polynemi) ecpresSion
Outcame?
(ormpleliopo he
Sdudet loe aBleto
-) Leoo the rra
-) eocn he Cuflicedion o cray
polynonmial epaesgion.
Sofwose & Horcdcce eguisemerts:
SeiwcYe & dcsclure 1equiements
Sofiwore'- Obntu(as gperang System) loipse TDE
thrccre'- DeskBep & keyboascl.
Thec onoept'
A polynormia) is modhemcdiço
expressiontha CastainnOre then 2
-algoxithmie algebrjeermms. I+ is asup
3everal tesmAhat Cotain cliferent
pcwet Cf the Some Varible.
1iS necesSas fos tie polmomial
ecpression. Corsisls f two pests
mynctes
Kooeiedgs bene
Date:
Page No. lo
Conclusion'
Hesoe)e lecsn the Tmplem erdatien
mynota
8) Inpkment Appliced ien of Array in Ate poynaminl
eopressioo
Sol class poy9omio
private _int II co efficents;
public polynomia Cint clegree)
Coefficients sneu int Leleg1ee +L
return reslt
System.out.poiornC);
IRmynctes
Ne ENceiedog hane
Date
Page No
Qutput:
Polynonmicl :
Poynemial 2:
Sum of polynomiclsi
Evadation GP Polynornia! Lat x 2:24
mynotes
My Kngwiedgs bank
01:38
Sep
30
java
.Polynomial
Polynonial
java
javac
SS
: -3:
ThinkCentre
-neo-50t-Gen-3 neo-50t-Gen-3:
2:24
ThinkCentre-neo-50t-Gen
=
x
at
1
Polynomial
-
-ThinkCentre
Polynomials:
Sum
of 3x^O
2x^O1x^O
O
Terminal + 2: + + of
- 1:
Polynomial
mcaiGmca01
- nca01amca01
3x^1 2x^1 5x^1
Polynomial nca01Gmca01
Evaluation
+ + +
4x^2 3x^2 7x^2
Activities
A ?