Company: Infoedge_26april
Difficulty: medium
Minimum Taxes in Journey Problem Description Consider a city with toll plazas represented as nodes in an undirected and unrooted tree with n nodes, indexed from 0 to n-1. The connections between toll plazas are described by the 2D integer array path , where path[i] = [a, b] indicates that there is an edge between nodes a and b in the tree. Each toll plaza has an associated tax, and you are given an integer array tax , where tax[i] represents the tax required to cross the i th node. The total tax of any path is defined as the sum of the taxes of all nodes on that path. Now, you are provided with a 2D integer array journey , where journey[i] = [start, end] indicates the i th journey, starting from node start and traveling to the node end using any valid path. Before performing your first journey, you can choose some non-adjacent (Toll Plazas) nodes and halve the taxes. The objective is to find the minimum total tax sum to perform all the given journeys. Input Format The first line of inp