CMSC132 FINAL EXAM
REVIEW 100%
PROBLEMS SOLVED
What Bis Bthe Bmain Breason Bsoftware Bprojects Bfail? B- B Bcorrect Banswer-Complexity
Bof Bprojects
What Bis Bthe Bprogram Blife-cycle? B- B Bcorrect Banswer-Problem BSpecification,
BProgram BDesign, BAlgorithms Band BData BStructures, BCoding Band BDebugging,
BTesting Band BVerification, BDeployment, BDocumentation Band BSupport,
BMaintenance Band BUpgrades
True/False: BCompared Bto Bprogram Bverification, Bempirical Btesting... B- B Bcorrect
Banswer-a) BHandles Blarger Bprograms B(True)
b) BAlways Bcatches Bmore Berrors B(False)
c) BEnsures Bcode Bis Bcorrect B(False)
d) BCan Bbe Bapplied Bwithout Bexamining Bcode B(False, Bbut Bmaybe BTrue?)
True/False: BAccording Bto Bthe Bunified Bmodel... B- B Bcorrect Banswer-a) BDesign Ball
Balgorithms Bbefore Bcoding B(False)
b) BWrite Btest Bcases Bbefore Bcoding B(False)
, c) BUse Ba Bprototype Bimplementation Bto Brefine Bdesign B(True)
True/False: BAccording Bto Bthe BWaterfall Bmodel... B- B Bcorrect Banswer-a) BDesign
Ball Balgorithms Bbefore Bcoding B(True)
b) BWrite Btest Bcases Bbefore Bcoding B(False)
c) BUse Bprototype Bimplementation Bto Brefine Bdesign B(False)
What Bis Bthe Bkey Bproperty Bof Ba Bbinary Bsearch Btree? B- B Bcorrect Banswer-Has B0-
2 Bchildren Bper Bnode
On Baverage, Bwhat Bis Bthe B(algorithmic) Bcomplexity Bof Bdoing Ban Binsertion Bin Ba
Bbinary Btree? B- B Bcorrect Banswer-O(log(n))
On Baverage, Bwhat Bis Bthe B(algorithmic) Bcomplexity Bof Bdoing Ba Bfind Bin Ba Bbinary
Btree? B- B Bcorrect Banswer-O(log(n))
What Bis Bthe Bworst Bcase Bcomplexity Bof Bdoing Ba Bfind Bin Ba BBinary BSearch
BTree? B- B Bcorrect Banswer-O(h), Bwhere Bh Bis Bthe Bheight Bof Bthe Btree
What Bcan Bcause Bworst-case Bbehavior Bin Ba Bbinary Btree? B- B Bcorrect Banswer-
Degenerative Btrees. BMeaning Bthat, Bthe Bdata Bbeing Bentered Binto Bthe Btree Bis
Balready Bin Border, Bleading Bto Ba Bsorted BLinked BList. B
Inserting B10,20,30,40,50,... Bwill Blead Bto Ba Bsingle B"column" B? Btree Bthat Bleads Bto
Ba Bvery Blarge Btree Bheight
What Bis Ba Btree Btraversal B- B Bcorrect Banswer-The Bprocess Bof Bfinding Ball Bthe
Bnodes Bin Ba BTree, Band Bdetermining Bther Brelationship
What Bis Bthe Bdifference Bbetween Ba Bdepth-first Band Bbreadth-first Btraversal? B- B
Bcorrect Banswer-Breadth-first Bvisit Bcloser Bnodes Bfirst.
Depth-first Bhas Bthree Bmodes:
Preorder B- Bparent B> Bleft Bchild B> Bright Bchild
Inorder B- Bleft Bchild B> Bparent B> Bright Bchild
Postorder B- Bleft Bchild B> Bright Bchild B> Bparent
Pre-order Btraversals Bare Bfaster Bthan Bpost-order Btraversals, BT Bor BF B- B Bcorrect
Banswer-F
Preorder, BInorder Band BPostorder Bare Ball BO(n)
What Bare Bthe Btwo Bkey Bproperties Bof Ba Bheap B? B- B Bcorrect Banswer-Complete
B(Balanced) BBinary BTree, BValue Bat BNode
What Boperation(s) Bsupported Bby Bbinary Bsearch Btrees Bare Bnot Bsupported Bby
Bheaps? B- B Bcorrect Banswer-Find Bany Bvalue. BFor BBSTs Bit's Beither BO(log(n)) Bfor
Bbalanced Btrees Bor BO(n) Bfor Bdegenerate Btrees.
Heaps Bcan Bonly Breadily Bprovide BMin Bor BMax Bvalues
On Baverage, Bwhat Bis Bthe Bcomplexity Bof Bdoing Ban Binsertion Bin Ba Bheap B? B- B
Bcorrect Banswer-O(log(n))
REVIEW 100%
PROBLEMS SOLVED
What Bis Bthe Bmain Breason Bsoftware Bprojects Bfail? B- B Bcorrect Banswer-Complexity
Bof Bprojects
What Bis Bthe Bprogram Blife-cycle? B- B Bcorrect Banswer-Problem BSpecification,
BProgram BDesign, BAlgorithms Band BData BStructures, BCoding Band BDebugging,
BTesting Band BVerification, BDeployment, BDocumentation Band BSupport,
BMaintenance Band BUpgrades
True/False: BCompared Bto Bprogram Bverification, Bempirical Btesting... B- B Bcorrect
Banswer-a) BHandles Blarger Bprograms B(True)
b) BAlways Bcatches Bmore Berrors B(False)
c) BEnsures Bcode Bis Bcorrect B(False)
d) BCan Bbe Bapplied Bwithout Bexamining Bcode B(False, Bbut Bmaybe BTrue?)
True/False: BAccording Bto Bthe Bunified Bmodel... B- B Bcorrect Banswer-a) BDesign Ball
Balgorithms Bbefore Bcoding B(False)
b) BWrite Btest Bcases Bbefore Bcoding B(False)
, c) BUse Ba Bprototype Bimplementation Bto Brefine Bdesign B(True)
True/False: BAccording Bto Bthe BWaterfall Bmodel... B- B Bcorrect Banswer-a) BDesign
Ball Balgorithms Bbefore Bcoding B(True)
b) BWrite Btest Bcases Bbefore Bcoding B(False)
c) BUse Bprototype Bimplementation Bto Brefine Bdesign B(False)
What Bis Bthe Bkey Bproperty Bof Ba Bbinary Bsearch Btree? B- B Bcorrect Banswer-Has B0-
2 Bchildren Bper Bnode
On Baverage, Bwhat Bis Bthe B(algorithmic) Bcomplexity Bof Bdoing Ban Binsertion Bin Ba
Bbinary Btree? B- B Bcorrect Banswer-O(log(n))
On Baverage, Bwhat Bis Bthe B(algorithmic) Bcomplexity Bof Bdoing Ba Bfind Bin Ba Bbinary
Btree? B- B Bcorrect Banswer-O(log(n))
What Bis Bthe Bworst Bcase Bcomplexity Bof Bdoing Ba Bfind Bin Ba BBinary BSearch
BTree? B- B Bcorrect Banswer-O(h), Bwhere Bh Bis Bthe Bheight Bof Bthe Btree
What Bcan Bcause Bworst-case Bbehavior Bin Ba Bbinary Btree? B- B Bcorrect Banswer-
Degenerative Btrees. BMeaning Bthat, Bthe Bdata Bbeing Bentered Binto Bthe Btree Bis
Balready Bin Border, Bleading Bto Ba Bsorted BLinked BList. B
Inserting B10,20,30,40,50,... Bwill Blead Bto Ba Bsingle B"column" B? Btree Bthat Bleads Bto
Ba Bvery Blarge Btree Bheight
What Bis Ba Btree Btraversal B- B Bcorrect Banswer-The Bprocess Bof Bfinding Ball Bthe
Bnodes Bin Ba BTree, Band Bdetermining Bther Brelationship
What Bis Bthe Bdifference Bbetween Ba Bdepth-first Band Bbreadth-first Btraversal? B- B
Bcorrect Banswer-Breadth-first Bvisit Bcloser Bnodes Bfirst.
Depth-first Bhas Bthree Bmodes:
Preorder B- Bparent B> Bleft Bchild B> Bright Bchild
Inorder B- Bleft Bchild B> Bparent B> Bright Bchild
Postorder B- Bleft Bchild B> Bright Bchild B> Bparent
Pre-order Btraversals Bare Bfaster Bthan Bpost-order Btraversals, BT Bor BF B- B Bcorrect
Banswer-F
Preorder, BInorder Band BPostorder Bare Ball BO(n)
What Bare Bthe Btwo Bkey Bproperties Bof Ba Bheap B? B- B Bcorrect Banswer-Complete
B(Balanced) BBinary BTree, BValue Bat BNode
What Boperation(s) Bsupported Bby Bbinary Bsearch Btrees Bare Bnot Bsupported Bby
Bheaps? B- B Bcorrect Banswer-Find Bany Bvalue. BFor BBSTs Bit's Beither BO(log(n)) Bfor
Bbalanced Btrees Bor BO(n) Bfor Bdegenerate Btrees.
Heaps Bcan Bonly Breadily Bprovide BMin Bor BMax Bvalues
On Baverage, Bwhat Bis Bthe Bcomplexity Bof Bdoing Ban Binsertion Bin Ba Bheap B? B- B
Bcorrect Banswer-O(log(n))