• 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 7 pages
Exam (elaborations)

Cse 310 Exam 1 Questions And Answers 100% Pass

Document preview thumbnail
Preview 2 out of 7 pages

CSE 310 EXAM 1 QUESTIONS AND ANSWERS 100% PASS

Content preview

CSE 310 EXAM 1 QUESTIONS AND
ANSWERS 100% PASS




Big O notation - ANS O(g(n) = f(n) if f(n) <= a*g(n) while n >= b



Big Ω notation - ANS Ω(g(n)) = f(n) if f(n) >= a*g(n) while n >= b



Big Θ notation - ANS Θ(g(n)) = f(n) if f(n) <= a*g(n) and f(n) >= b*g(n) for all n >= c



To prove correctness of algorithm, show ______, _____ and _____ hold - ANS initialization,
maintenance, and termination



Index of left child of node - ANS i = index of node

2*i = index of node's left child



parent index in heap - ANS i = index of node

floor(i/2) = index of node's parent



What does heap-extract max do? - ANS 1) takes out the head of heap and replaces it with last
node

2) performs max-heapify on head

1 @COPYRIGHT 2025/2026 ALLRIGHTS RESERVED.

, Find the expression associated with the runtime of this pseudocode (i.e. C1 x n + C2 x n ... etc)
and find the big O approximation



k=1 // C1

do // C2

{

j = 1 // C3

do // C4

{

j = j*2 // C5

}while(j < n) // C6

k++ // C7

}while (k < n) // C8 - ANS C1 x 1 + C2 x n + C3 x n + C4 x n(log_2(n)) + C5 x n(log_2(n)) + C6 x
n(log_2(n)) + C7 x n + C8 x n = O(nlogn)



Time of max-heapify - ANS O(logn)



O approximation of T(n) = T(n/2)+cn+b - ANS O(nlogn)



What is the height of a heap? - ANS The number of edges from head to lowest node



Quicksort best case (and what causes it?) - ANS O(nlogn) when the pivot perfectly divides the
array each iteration



Heap-increase-key runtime - ANS O(logn)


2 @COPYRIGHT 2025/2026 ALLRIGHTS RESERVED.

Document information

Uploaded on
January 9, 2026
Number of pages
7
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers
$12.99

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.
Fyndlay
3.6
(79)
Sold
442
Followers
82
Items
22096
Last sold
22 hours 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