100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
CS 6515 Final Questions and Correct Answers the Latest Update $10.49   Add to cart

Exam (elaborations)

CS 6515 Final Questions and Correct Answers the Latest Update

 1 view  0 purchase
  • Course
  • CS 6515
  • Institution
  • CS 6515

Quick Sort Runtime O(n^2) O(nlogn) with median of medians Merge Sort Runtime O(nlogn) Quick Select Runtime O(n^2) O(n) with median of medians (Fast select) Dijkstra's algorithm An algorithm for finding the shortest paths between nodes in a weighted graph. For a given source node in...

[Show more]

Preview 2 out of 11  pages

  • October 21, 2024
  • 11
  • 2024/2025
  • Exam (elaborations)
  • Questions & answers
  • CS 6515
  • CS 6515
avatar-seller
Examify
Examify | OnlineExams | TestPrep | StudyResources | AcademicSuccess |
ExamPreparation | QuizTime | LearningTools | Education | StudentSupport



CS 6515 Final Questions and Correct
Answers the Latest Update
Quick Sort Runtime

✓ O(n^2)
✓ O(nlogn) with median of medians



Merge Sort Runtime

✓ O(nlogn)



Quick Select Runtime

✓ O(n^2)
✓ O(n) with median of medians (Fast select)



Dijkstra's algorithm

✓ An algorithm for finding the shortest paths between nodes in a weighted graph. For
a given source node in the graph, the algorithm finds the shortest path between
that node and every other. It can also be used for finding the shortest paths from a
single node to a single destination node by stopping the algorithm once the shortest
path to the destination node has been determined. Its time complexity is O(E +
VlogV), where E is the number of edges and V is the number of vertices.

✓ - uses min-heap (prio-queue)
✓ - O((n+m) log n)
✓ - O(m log n) - strongly connected

✓ - prev(u)




Smart Grades Latest update
1

, Examify | OnlineExams | TestPrep | StudyResources | AcademicSuccess |
ExamPreparation | QuizTime | LearningTools | Education | StudentSupport

Kruskal's Algorithm

✓ (Minimum Spanning Trees, O(mlogn) with a union find, which is fast for sparse
graphs) Builds up connected components of vertices, repeatedly considering the
lightest remaining edge and tests whether its two endpoints lie within the same
connected component. If not, insert the edge and merge the two components into
one.

✓ input: undirected G=(V,E) with weights w(e)
✓ 1. sort E by incr weight (O(mlogn))
✓ 2. set X = empty set
✓ 3. for e = (v, w) exists E (go through in order)
✓ if x Ue doesnt have a cycle
✓ then: X = X U e(checks if v and w are in different components: O(log n))
✓ 4. return X

✓ returns MST defined by edges X



Prim's Algorithm for MST

✓ Start with a node and add edge with the lowest weight. Then from the current
existing nodes add the next smallest edge that exists going out from all the existing
nodes. Do this until all vertices are connected.

✓ - min spanning tree defined by array prev[]
✓ - O(m log n)



Ford-Fulkerson Algorithm

✓ Runtime: O(mC)Input: Graph with integer edge weights. (Note: Does not work with
Infinity)Output: max flow f*

✓ 1. set f_e = 0 for all edges

Smart Grades Latest update
1

The benefits of buying summaries with Stuvia:

Guaranteed quality through customer reviews

Guaranteed quality through customer reviews

Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.

Quick and easy check-out

Quick and easy check-out

You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.

Focus on what matters

Focus on what matters

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!

Frequently asked questions

What do I get when I buy this document?

You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.

Satisfaction guarantee: how does it work?

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.

Who am I buying these notes from?

Stuvia is a marketplace, so you are not buying this document from us, but from seller Examify. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

No, you only buy these notes for $10.49. You're not tied to anything after your purchase.

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

83507 documents were sold in the last 30 days

Founded in 2010, the go-to place to buy study notes for 14 years now

Start selling
$10.49
  • (0)
  Add to cart