Part of list:

HackerRank Week Of Code 31: Spanning Tree Fraction

HackerRank Week Of Code 31: Spanning Tree Fraction

Problem in short: Consider an undirected graph of N nodes, M edges. Each edge is labeled with two integers A, B. Find a spanning tree of this graph which has the maximum possible value for the following expression:

\sum_{edges \in tree} \frac {A_{edge}}{B_{edge}}

Constraints: 1 <= N, M <= 10^5

Read more…(45 words)

Mark as completed

Part of lists:

Previous

[IITWPC4I] Petya and Repairment of Roads

Next

Centroid Decomposition in Trees Tutorial

About the author:

Hussain Kara Fallah

Loading…

Have a question? Ask here…

Post

Part of list:

HackerRank Week Of Code 31: Spanning Tree Fraction

About the author

Hussain Kara Fallah

Ready to join our community?

Sign up below to automatically get notified of new lists, get **reminders** to finish ones you subscribe to, and **bookmark** articles to read later.

Continue with Facebook

— OR —

Your Full Name

Email address

I have an account. Log in instead

By signing up, you agree to our Terms and our Privacy Policy.