solution
In an online game, N blocks are arranged in a hierarchical manner. Each block is given an ID from 1 to N. A block may be further connected to other blocks. All the blocks are connected by N-1 connections. Each block is assigned a specific point value. A player starts from a block (S). She must move forward from each block to a directly connected block until she reaches the final block, which has no further connection. When the player lands on a block, she collects the point value of that block. The player’s score is calculated as the product of block points that the player collects. The player who earns the maximum score wins the game. Write an algorithm to find the maximum score of the winner.
"Looking for a Similar Assignment? Get Expert Help at an Amazing Discount!"
