• Wrong document? Swap it for free
  • Written by students who passed
  • Immediately available after payment
  • Read online or as PDF
Sell
Where do you study
Your language
Document preview thumbnail
Preview 2 out of 5 pages
Exam (elaborations)

CMSC132 Final Exam review(All solved)

Document preview thumbnail
Preview 2 out of 5 pages

What is the main reason software projects fail? correct answers Complexity of projects What is the program life-cycle? correct answers Problem Specification, Program Design, Algorithms and Data Structures, Coding and Debugging, Testing and Verification, Deployment, Documentation and Support, Maintenance and Upgrades True/False: Compared to program verification, empirical testing... correct answers a) Handles larger programs (True) b) Always catches more errors (False) c) Ensures code is correct (False) d) Can be applied without examining code (False, but maybe True?) True/False: According to the unified model... correct answers a) Design all algorithms before coding (False) b) Write test cases before coding (False) c) Use a prototype implementation to refine design (True) True/False: According to the Waterfall model... correct answers a) Design all algorithms before coding (True) b) Write test cases before coding (False) c) Use prototype implementation to refine design (False) What is the key property of a binary search tree? correct answers Has 0-2 children per node On average, what is the (algorithmic) complexity of doing an insertion in a binary tree? correct answers O(log(n)) On average, what is the (algorithmic) complexity of doing a find in a binary tree? correct answers O(log(n)) What is the worst case complexity of doing a find in a Binary Search Tree? correct answers O(h), where h is the height of the tree What can cause worst-case behavior in a binary tree? correct answers Degenerative trees. Meaning that, the data being entered into the tree is already in order, leading to a sorted Linked List. Inserting 10,20,30,40,50,... will lead to a single "column" ? tree that leads to a very large tree height What is a tree traversal correct answers The process of finding all the nodes in a Tree, and determining ther relationship What is the difference between a depth-first and breadth-first traversal? correct answers Breadth-first visit closer nodes first.

Content preview

CMSC132 Final Exam review(All solved)
What is the main reason software projects fail? correct answers Complexity of projects
What is the program life-cycle? correct answers Problem Specification, Program Design, Algorithms and Data Structures, Coding and Debugging, Testing and Verification, Deployment, Documentation and Support, Maintenance and Upgrades
True/False: Compared to program verification, empirical testing... correct answers a) Handles larger programs (True)
b) Always catches more errors (False)
c) Ensures code is correct (False)
d) Can be applied without examining code (False, but maybe True?)
True/False: According to the unified model... correct answers a) Design all algorithms before coding (False)
b) Write test cases before coding (False)
c) Use a prototype implementation to refine design (True)
True/False: According to the Waterfall model... correct answers a) Design all algorithms before coding (True)
b) Write test cases before coding (False)
c) Use prototype implementation to refine design (False)
What is the key property of a binary search tree? correct answers Has 0-2 children per node
On average, what is the (algorithmic) complexity of doing an insertion in a binary tree? correct answers O(log(n))
On average, what is the (algorithmic) complexity of doing a find in a binary tree? correct answers O(log(n))
What is the worst case complexity of doing a find in a Binary Search Tree? correct answers O(h), where h is the height of the tree
What can cause worst-case behavior in a binary tree? correct answers Degenerative trees. Meaning that, the data being entered into the tree is already in order, leading to a sorted Linked List. Inserting 10,20,30,40,50,... will lead to a single "column" ? tree that leads to a very large
tree height
What is a tree traversal correct answers The process of finding all the nodes in a Tree, and determining ther relationship
What is the difference between a depth-first and breadth-first traversal? correct answers
Breadth-first visit closer nodes first. Depth-first has three modes:
Preorder - parent > left child > right child
Inorder - left child > parent > right child
Postorder - left child > right child > parent
Pre-order traversals are faster than post-order traversals, T or F correct answers F
Preorder, Inorder and Postorder are all O(n)
What are the two key properties of a heap ? correct answers Complete (Balanced) Binary Tree, Value at Node
What operation(s) supported by binary search trees are not supported by heaps? correct answers Find any value. For BSTs it's either O(log(n)) for balanced trees or O(n)
for degenerate trees.
Heaps can only readily provide Min or Max values
On average, what is the complexity of doing an insertion in a heap ? correct answers O(log(n))
On average, what is the complexity of doing a find in a heap? correct answers O(log(n))
What is algorithmic complexity? correct answers Amount of resources required by algorithm with respect to problem size
List a reason benchmarking is better that analyzing complexity correct answers Precise information for given configuration
Implementation, hardware, inputs details
What is the difference between best case, worst case, and average case ? correct answers Best case: Smallest number of steps required
Worst case: Largest number of steps required
Average case: typical number of steps required
What does big O notation represent? correct answers Big O notation is a mathematical notation that describes the limiting behavior of a function when the argument tends towards a particular value or infinity.
Describe the difference between a directed and undirected graph correct answers An Undirected graph is a graph in which the veritcies are connected bidirectionally. A Directed graph is a graph in which the vertices are connected unidirectionally
Describe the difference between a path and a cycle correct answers A cycle is a closed path, starts and ends at the same vertex.
A path starts and ends at different vertices

Document information

Uploaded on
May 29, 2024
Number of pages
5
Written in
2023/2024
Type
Exam (elaborations)
Contains
Questions & answers
$11.49

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
Sold
23
Followers
6
Items
4026
Last sold
1 month ago




Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions