CSE214 COMPUTER SCIENCE II
 FINAL EXAM PRACTICE QUESTIONS
USE THE FOLLOWING INFORMATION TO ANSWER PROBLEMS 1.1-1.4:
Consider the following four operations on a data structure containing n data values.
A. Finding the maximum value in a singly linked list of n IntNode nodes. O(n)
B. Finding the maximum value in an array of n int values by sorting it first using insertion
sort.O(n^2)
C. Finding the maximum value in a full binary search tree of n BTNode nodes.O(log n)
D. Finding the maximum value in a standard heap of n data values. O(1)
1.1 The worst-case order of complexity is O(1) for which of these operations?
(a) A (b) B (c) C (d) D (e) none of these answers
1.2 The worst-case order of complexity is O(log n) for which of these operations?
(a) A (b) B (c) C (d) D (e) none of these answers
1.3 The worst-case order of complexity is O(n) for which of these operations?
(a) A (b) B (c) C (d) D (e) none of these answers
1.4 The worst-case order of complexity is O(n log n) for which of these operations?
(a) A (b) B (c) C (d) D (e) none of these answers
1.5 Which of the following postfix expressions evaluates to 35 (assuming integer division)?
(a) 5 4 3 2 1 + * - / (b) 5 4 3 2 1 * - / +
(c) 5 4 3 2 1 - / + * (d) 5 4 3 2 1 / + * -
(e) none of these answers
1.6 Consider a binary tree as a directed graph, where every non-leaf node has an edge to each of its
children. Assuming that left child is visited before right child, the depth-first traversal of this graph started
at root, is equivalent to which of the following binary tree traversal?
(a) preorder (b) postorder (c) inorder (d) none of these answers
1.7 What is the maximum number of edges in an undirected graph with n vertices without any multiple
edges? Remember self-cycles (self-loops) must be counted.
(a) n (b) n2
 (c) n2 – n (d) (n2 + n)/2 (e) (n2 – n)/2
1.8 What is the maximum number of edges in a simple directed graph with n vertices? Directed = n^2
(a) n (b) n2
 (c) n2 – n (d) (n2 + n)/2 (e) (n2 – n)/2
1.9 What is the order of complexity for the most efficient algorithm to make a heap, i.e. to convert an array
into a heap?

No comments found.
Login to post a comment

jordancarter 6 months ago

This study guide is clear, well-organized, and covers all the essential topics. The explanations are concise, making complex concepts easier to understand. It could benefit from more practice questions, but overall, it's a great resource for efficient studying. Highly recommend!
Login to review this item
Q. What will I receive when I purchase this document?
A. You will receive a PDF that is available for instant download upon purchase. The document will be accessible to you at any time, from anywhere, and will remain available indefinitely through your profile.
Q. Satisfaction guarantee: how does it work?
A. Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.
Q. Who am I buying these notes from?
A. you are buying this document from us learnexams
Q. Will I be stuck with a subscription?
A. No, you only buy these notes for $ indicated . You are not obligated to anything after your purchase.
Q. Can learnexams be trusted?
A. check our reviews at trustpilot
Price $17.50
Add To Cart

Buy Now
Category Study Material
Comments 0
Rating
Sales 0

Buy Our Plan

We have

The latest updated Study Material Bundle with 100% Satisfaction guarantee

Visit Now
{{ userMessage }}
Processing