WGU C949 DATA STRUCTURES AND ALGORITHMS I EXAM W
n n n n n n n n
ITH 200+ QUESTIONS AND CORRECT ANSWERS| A GRADE
n n n n n n n
C949-nDatanStructuresnandnAlgorithmsnI,nC949nWGU
Whichnstatementndescribesnanqueue ndatanstructure?
Itnisnansequence nofnelementsninnwhichninsertionsncanntake nplace nonlynatnthenbacknendnandndeletionsnca
nntake nplace nonlynatnthe nfrontnend.
Whatnare nthe nofficialnindexesnfornthenlistnlist01ngivennthisndeclaration?nint[n]nlist01n= n{0,n2,n4,n6,n8,n10};n
0,n1,n2,n3,n4,n5
Whichnabstractndatantypen(ADT) nhasnelementsnofnthensamentypensonthatnthe nelementsncannbenretrievednb
asednonnthe nindex nornposition?
List
Whatnisnthe ncorrectnordernof ncontentsnafternthe npushnoperationnisnperformednwithnthe nvalue n'bacon'?
'bacon' n'sa
usage' n'to
ast' n'eggs'
'ham'
Itemsnwere naddednsequentiallyninnthisnstacknstartingnwithn"dog":n"bir
d"
"rabbit"
,"cat"
"dog"
Whatnisnthe nreturnnvalue nof nthe npopnoperation?
"bird"
Whichnsequence nof nlettersnrepresentsnpreorderntraversalnofnthe nnodesnofnthisntree?
A
/n\n
BnC
/n\
/n\n
DnE
\n/n\n
FnGnH
/
n I
AnBnCnDnFnEnG nInH
Whichncategorynof ndatandoesn("FB",n75.00,n75.03,n74.90) nrepresentninnthe npseudocode?
importndatetime
defnmiddle(stock,ndate):
symbol,ncurrent,nhigh,nlown=nstockn
returnn(((highn+ nlow)n/n2),ndate)
mid_value,ndate n= nmiddle(("FB",n75.00,n75.03,n74.90),
datetime.date(2014,n10,n31))nTupl
e
,Whichndatantype ndoesnthe nmysterynfunctionnreturn?
return_type nmysteryn(intnR)
{
intnNumUnitsn= nR;returnnNumUnitsn* n3.14;
}
Double
Whichnvalue nisnappropriate nfornthe nvariable nmiddle ngivennthe npseudocode?
functionnmystery()
{
stringnlast;ns
tringnfirst;nc
harnmiddle;ni
ntnphone;nfl
oatnrate;
}n'
D'
Whatnisnthe nmostnefficientndatantype ntonuse nfornthisndatansetnof nanfixednsize ninnJava?
an= n[0,n0,n1,n4,n7,n16,n31,n64,n127]
Array
Whatnisntrue naboutngarbage ncollection?
Itnreclaimsnmemorynfromndatanstructuresnimplementednusingnlinkednallocations.
, Whatnisntrue naboutnandatanstructure nimplementednusingnlinkednallocation?
Storage nisnallocatednusingnpointersntonnewnlocationsnasnneeded.
Whatnare nthe narraynelementsncorrespondingntonthe nmid-
valuesninnthe nfirstnandnsecondniterationsnofnanbinarynsearchninnannarraynarrn=n{45,n77,n89,n90,n94,n99,n100}na
ndnkeyn= n100?
90nandn99
Whatnisnthe neffectnonnthe nobjectnComputingnregardingngarbage ncollection?
Computingnobjn= nnewnComputing();nobjn= nnull;
Itnisnautomaticallynavailable nforngarbage ncollection.
Whatnare nthe nmid-valuesninnthe nfirstnandnsecondnlevelsnofnrecursionninnthisnbinarynsearch?
intnarrn= n{46,n76,n89,n90,n94,n99,n100}nandnkeyn= n99
90nandn99
Whichndatansetnisnrepresentednusingnthe ndictionaryndatantype?
Ansetnofnstudentsnandntheirntestnscores
Whatnisnancharacteristicnofnkeysninnannassociative ndictionaryndatantype?
Theynare nunique nandnimmutable.
n n n n n n n n
ITH 200+ QUESTIONS AND CORRECT ANSWERS| A GRADE
n n n n n n n
C949-nDatanStructuresnandnAlgorithmsnI,nC949nWGU
Whichnstatementndescribesnanqueue ndatanstructure?
Itnisnansequence nofnelementsninnwhichninsertionsncanntake nplace nonlynatnthenbacknendnandndeletionsnca
nntake nplace nonlynatnthe nfrontnend.
Whatnare nthe nofficialnindexesnfornthenlistnlist01ngivennthisndeclaration?nint[n]nlist01n= n{0,n2,n4,n6,n8,n10};n
0,n1,n2,n3,n4,n5
Whichnabstractndatantypen(ADT) nhasnelementsnofnthensamentypensonthatnthe nelementsncannbenretrievednb
asednonnthe nindex nornposition?
List
Whatnisnthe ncorrectnordernof ncontentsnafternthe npushnoperationnisnperformednwithnthe nvalue n'bacon'?
'bacon' n'sa
usage' n'to
ast' n'eggs'
'ham'
Itemsnwere naddednsequentiallyninnthisnstacknstartingnwithn"dog":n"bir
d"
"rabbit"
,"cat"
"dog"
Whatnisnthe nreturnnvalue nof nthe npopnoperation?
"bird"
Whichnsequence nof nlettersnrepresentsnpreorderntraversalnofnthe nnodesnofnthisntree?
A
/n\n
BnC
/n\
/n\n
DnE
\n/n\n
FnGnH
/
n I
AnBnCnDnFnEnG nInH
Whichncategorynof ndatandoesn("FB",n75.00,n75.03,n74.90) nrepresentninnthe npseudocode?
importndatetime
defnmiddle(stock,ndate):
symbol,ncurrent,nhigh,nlown=nstockn
returnn(((highn+ nlow)n/n2),ndate)
mid_value,ndate n= nmiddle(("FB",n75.00,n75.03,n74.90),
datetime.date(2014,n10,n31))nTupl
e
,Whichndatantype ndoesnthe nmysterynfunctionnreturn?
return_type nmysteryn(intnR)
{
intnNumUnitsn= nR;returnnNumUnitsn* n3.14;
}
Double
Whichnvalue nisnappropriate nfornthe nvariable nmiddle ngivennthe npseudocode?
functionnmystery()
{
stringnlast;ns
tringnfirst;nc
harnmiddle;ni
ntnphone;nfl
oatnrate;
}n'
D'
Whatnisnthe nmostnefficientndatantype ntonuse nfornthisndatansetnof nanfixednsize ninnJava?
an= n[0,n0,n1,n4,n7,n16,n31,n64,n127]
Array
Whatnisntrue naboutngarbage ncollection?
Itnreclaimsnmemorynfromndatanstructuresnimplementednusingnlinkednallocations.
, Whatnisntrue naboutnandatanstructure nimplementednusingnlinkednallocation?
Storage nisnallocatednusingnpointersntonnewnlocationsnasnneeded.
Whatnare nthe narraynelementsncorrespondingntonthe nmid-
valuesninnthe nfirstnandnsecondniterationsnofnanbinarynsearchninnannarraynarrn=n{45,n77,n89,n90,n94,n99,n100}na
ndnkeyn= n100?
90nandn99
Whatnisnthe neffectnonnthe nobjectnComputingnregardingngarbage ncollection?
Computingnobjn= nnewnComputing();nobjn= nnull;
Itnisnautomaticallynavailable nforngarbage ncollection.
Whatnare nthe nmid-valuesninnthe nfirstnandnsecondnlevelsnofnrecursionninnthisnbinarynsearch?
intnarrn= n{46,n76,n89,n90,n94,n99,n100}nandnkeyn= n99
90nandn99
Whichndatansetnisnrepresentednusingnthe ndictionaryndatantype?
Ansetnofnstudentsnandntheirntestnscores
Whatnisnancharacteristicnofnkeysninnannassociative ndictionaryndatantype?
Theynare nunique nandnimmutable.