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]quickselect - ANSWER an algorithm that selects the kth smallest element in a list. 
Why is quickselect asymptotically faster than quicksort? - ANSWER quicksort 
recurses on both subarrays after partitioning, whearas quickselect recurses only 
on the subarray that probably contains the k-th largest e...
Preview 1 out of 4 pages
Add to cartquickselect - ANSWER an algorithm that selects the kth smallest element in a list. 
Why is quickselect asymptotically faster than quicksort? - ANSWER quicksort 
recurses on both subarrays after partitioning, whearas quickselect recurses only 
on the subarray that probably contains the k-th largest e...
Start at the beginning, sort the first 2 items in the list. Then, going through the 
list, add each next item into the sorted list, where it is supposed to be - Insertion 
sort 
Quick sort best case - O(nlogn) 
Quick sort average case - O(nlogn)
Preview 2 out of 5 pages
Add to cartStart at the beginning, sort the first 2 items in the list. Then, going through the 
list, add each next item into the sorted list, where it is supposed to be - Insertion 
sort 
Quick sort best case - O(nlogn) 
Quick sort average case - O(nlogn)
emoization - ANSWER Write the recursive function top-down. 
Alter the function to check if we've already calculated the value. 
If so, use the pre-calculated value, 
If not, do the recursive call. 
Fib - Memo - ANSWER def fib(n, fib_cache): 
if n in fib_cache: 
return fib_cache[n] 
fib_cache[n] = f...
Preview 2 out of 14 pages
Add to cartemoization - ANSWER Write the recursive function top-down. 
Alter the function to check if we've already calculated the value. 
If so, use the pre-calculated value, 
If not, do the recursive call. 
Fib - Memo - ANSWER def fib(n, fib_cache): 
if n in fib_cache: 
return fib_cache[n] 
fib_cache[n] = f...
Insertion Sort (O(n) - ANSWER Binary Search - Each item is taken in turn, 
compared to the items in a sorted list, and placed in the correct position. 
Merge Sort (O(n log n)) - ANSWER Divide-and-conquer paradigm - A list is split 
into individual lists, these are then combined (2 lists at a time). ...
Preview 1 out of 3 pages
Add to cartInsertion Sort (O(n) - ANSWER Binary Search - Each item is taken in turn, 
compared to the items in a sorted list, and placed in the correct position. 
Merge Sort (O(n log n)) - ANSWER Divide-and-conquer paradigm - A list is split 
into individual lists, these are then combined (2 lists at a time). ...
Inheritance - ANSWER Is a relationship 
class Shape(Circle): 
pass 
class Shape is a Circle, inherits all methods from circle and is an instance of the circle 
class, circle is the superclass and shape is the subclass
Preview 2 out of 5 pages
Add to cartInheritance - ANSWER Is a relationship 
class Shape(Circle): 
pass 
class Shape is a Circle, inherits all methods from circle and is an instance of the circle 
class, circle is the superclass and shape is the subclass
nheritance - ANSWER Inheritance means that a class inherits the characteristics 
of a superclass 
Inheritance means "is a" 
unit test - ANSWER A single indivisible case that can test the individual 
components of a class
Preview 1 out of 4 pages
Add to cartnheritance - ANSWER Inheritance means that a class inherits the characteristics 
of a superclass 
Inheritance means "is a" 
unit test - ANSWER A single indivisible case that can test the individual 
components of a class
time complexity of downheap - ANSWER O(logn) 
heapify - upheap - ANSWER start with unordered heap, upheap each element until the 
heap is built. Built from top down 
time complexity of heapify with upheap - ANSWER O(nlogn)
Preview 1 out of 3 pages
Add to carttime complexity of downheap - ANSWER O(logn) 
heapify - upheap - ANSWER start with unordered heap, upheap each element until the 
heap is built. Built from top down 
time complexity of heapify with upheap - ANSWER O(nlogn)
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 $26.49. You're not tied to anything after your purchase.
4.6 stars on Google & Trustpilot (+1000 reviews)
79271 documents were sold in the last 30 days
Founded in 2010, the go-to place to buy study notes for 14 years now