Maximum Path Quality of a Graph

Given a weighted undirected graph with n nodes (0-indexed), values array, and edges array, find the maximum path quality you can obtain. You start at node 0 and can travel at most maxTime.

The path quality is the sum of values of nodes you visit, counting each node's value at most once, even if visited multiple times.

Examples
Input: [[0,32,10,43],[[0,1,10],[1,2,15],[0,3,10]],49]
Output: 75
Hints

Maximum Path Quality of a Graph

Given a weighted undirected graph with n nodes (0-indexed), values array, and edges array, find the maximum path quality you can obtain. You start at node 0 and can travel at most maxTime.