Package deal
CSE 2050 EXAMSs BUNDLE WITH Questions Solved 100% Correct
CSE 2050 EXAMSs BUNDLE WITH Questions Solved 100% Correct
[Show more]CSE 2050 EXAMSs BUNDLE WITH Questions Solved 100% Correct
[Show more]Function of O(1) time complexity - ANSWER runs the same no matter how many 
iterations it goes through 
Quadratic Sorting Algorithms - ANSWER Time complexity of O(n^2) (Ex. Bubble Sort, 
Selection and Insertion Sort) 
Bubble Sort - ANSWER simplest sorting algorithm that works by repeatedly swapping ...
Preview 2 out of 7 pages
Add to cartFunction of O(1) time complexity - ANSWER runs the same no matter how many 
iterations it goes through 
Quadratic Sorting Algorithms - ANSWER Time complexity of O(n^2) (Ex. Bubble Sort, 
Selection and Insertion Sort) 
Bubble Sort - ANSWER simplest sorting algorithm that works by repeatedly swapping ...
inary Search Running Times - ANSWER Best: O(1) 
Worst O(logn) 
Average O(logn) 
Bubble Sort running Times - ANSWER Best O(n) 
Worst O(n^2) 
Average O(n^2)
Preview 1 out of 2 pages
Add to cartinary Search Running Times - ANSWER Best: O(1) 
Worst O(logn) 
Average O(logn) 
Bubble Sort running Times - ANSWER Best O(n) 
Worst O(n^2) 
Average O(n^2)
sorted() - ANSWER sorts and returns sorted list 
lexicographic - ANSWER if the key function returns a tuple, it will sort by the first 
element and break ties with subsequent elements 
ex: alphabetical order
Preview 2 out of 8 pages
Add to cartsorted() - ANSWER sorts and returns sorted list 
lexicographic - ANSWER if the key function returns a tuple, it will sort by the first 
element and break ties with subsequent elements 
ex: alphabetical order
Which of the following operations have a worst case asymptotic running time of O(logn) 
(no better, no worse) in a heap? - ANSWER insert, remove min, upheap, downheap 
Consider an undirected, unweighted graph. We want to visit all the vertices connected 
to a given start vertex, by order of non-decr...
Preview 2 out of 8 pages
Add to cartWhich of the following operations have a worst case asymptotic running time of O(logn) 
(no better, no worse) in a heap? - ANSWER insert, remove min, upheap, downheap 
Consider an undirected, unweighted graph. We want to visit all the vertices connected 
to a given start vertex, by order of non-decr...
Quadratic Sorting: Best at random distribution - ANSWER selection 
Quadratic Sorting: Worst at random distribution - ANSWER bubble 
Quadratic Sorting: Best at one big item at front - ANSWER bubble 
Quadratic Sorting: Worst at one big item at front - ANSWER selection
Preview 2 out of 5 pages
Add to cartQuadratic Sorting: Best at random distribution - ANSWER selection 
Quadratic Sorting: Worst at random distribution - ANSWER bubble 
Quadratic Sorting: Best at one big item at front - ANSWER bubble 
Quadratic Sorting: Worst at one big item at front - ANSWER selection
what is a potential drawback of using recursion without memoization for solving certain 
problems? - ANSWER it may involve redundant calculations and increased running time 
true or false: iterative solutions tend to use less memory compared to recursive 
solutions - ANSWER true 
true or false: gree...
Preview 2 out of 10 pages
Add to cartwhat is a potential drawback of using recursion without memoization for solving certain 
problems? - ANSWER it may involve redundant calculations and increased running time 
true or false: iterative solutions tend to use less memory compared to recursive 
solutions - ANSWER true 
true or false: gree...
Benefit of Using Selection Sort - ANSWER It only makes one swap per element (O(n)), 
which can reduce memory cost 
Best and Worst Case for Insertion Sort - ANSWER Best Case: only one object out of place 
O(n) swap 
Worst Case: reversed sorted (O(n^2))
Preview 2 out of 6 pages
Add to cartBenefit of Using Selection Sort - ANSWER It only makes one swap per element (O(n)), 
which can reduce memory cost 
Best and Worst Case for Insertion Sort - ANSWER Best Case: only one object out of place 
O(n) swap 
Worst Case: reversed sorted (O(n^2))
We want to heapify an unordered collection in O(n).Which of the following 
method(s) is most likely to be useful? 
a. we can achieve this using upheap or downheap 
b. using upheap (but not downheap) 
c. using downheap (but not upheap) 
d. repeatedly calling put - ANSWER c. using downheap (but not up...
Preview 2 out of 6 pages
Add to cartWe want to heapify an unordered collection in O(n).Which of the following 
method(s) is most likely to be useful? 
a. we can achieve this using upheap or downheap 
b. using upheap (but not downheap) 
c. using downheap (but not upheap) 
d. repeatedly calling put - ANSWER c. using downheap (but not up...
Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.
You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.
Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!
You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.
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.
Stuvia is a marketplace, so you are not buying this document from us, but from seller Examsplug. Stuvia facilitates payment to the seller.
No, you only buy these notes for $27.49. You're not tied to anything after your purchase.
4.6 stars on Google & Trustpilot (+1000 reviews)
79373 documents were sold in the last 30 days
Founded in 2010, the go-to place to buy study notes for 14 years now