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, 23.06.2019 09:30
Facial expressions and gestures are examples of messages.
Answers: 3
question
Computers and Technology, 23.06.2019 21:20
In microsoft word, when you highlight existing text you want to replace, you're in              a.  advanced mode.    b.  automatic mode.    c.  basic mode.    d.  typeover mode
Answers: 1
question
Computers and Technology, 24.06.2019 07:00
Why do we mark tlc plates with pencil and not with pen
Answers: 2
question
Computers and Technology, 25.06.2019 08:30
In the context of intentional computer and network threats a is a programming routine built into a system by its designer
Answers: 2
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
Mathematics, 17.12.2020 01:00
question
Mathematics, 17.12.2020 01:00
question
Mathematics, 17.12.2020 01:00
question
Law, 17.12.2020 01:00
question
Mathematics, 17.12.2020 01:00
question
Law, 17.12.2020 01:00
question
Mathematics, 17.12.2020 01:00
Questions on the website: 13722367