subject

Your team at amazon is overseeing the design of a new high-efficiency data center at HQ2. A power grid need to be generated for supplying power to N servers. All servers in the grid have to be connected such that they have access to power. The cost of connections between different servers varies. Assume that there are no ties, names of servers are unique, connections are directionless, there is at most one connection between a pair of servers, all costs are greater than zero, and a server does not connect to itself. Write an algorithm to minimize the cost of connecting all servers in the power grid. Input two arguments - num, an Integer representing number of connections. connectons, representing a list of connections where each element of the list consists of two servers and the cost of connection between the servers. Note: The cost of connection between the servers is always greater than 0. Example Input num = 5 connection = [[A, B,1], [B, C,4], [B, D,6], [D, E,5], [C, E,1]]

Output [[A, B,1], [B, C,4], [C, E,1], [D, E,5]]

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 20:00
An excel which cell contains =b2 is copied to row below, the same column. what will be the new cell's content
Answers: 2
question
Computers and Technology, 23.06.2019 22:20
Read “suburban homes construction project” at the end of chapters 8 and 9 (in the textbook) and then develop a wbs (work breakdown structure) in microsoft excel or in microsoft word (using tables)
Answers: 1
question
Computers and Technology, 24.06.2019 07:00
Why would a business likely use a java applet - to back up their data files for the business - to create a program that a customer can launch in their web browser - to create music on a powerpoint presentation - to organize files on their company directory
Answers: 3
question
Computers and Technology, 25.06.2019 00:00
When pasting an existing chart into a word document, you can choose to using the paste options button. a. paste the chart as a picture b. embed the chart c. add the chart while keeping the destination formatting intact d. insert the chart while keeping the source formatting intact
Answers: 1
You know the right answer?
Your team at amazon is overseeing the design of a new high-efficiency data center at HQ2. A power gr...
Questions
question
Business, 06.05.2021 22:20
question
Mathematics, 06.05.2021 22:20
Questions on the website: 13722361