You are given a list of hierarchical string entries, each with an associated integer value. Each entry represents a path in a hierarchy, similar to a file system path or a domain name. The goal is to compute the aggregated value for each leaf node in the hierarchy. The aggregation rule is that each entry's value contributes to itself and all of its ancestors. Specifically, you are given a list of strings and corresponding integer values. Each string represents a path, where parts of the path are separated by dots (`.`). For example, `"a.b.c"` represents a path with three levels: `a`, `b`, and `c`. The value associated with this path contributes to the values of `a`, `a.b`, and `a.b.c`. Your task is to write a function that takes a list of paths and their corresponding values as input, and returns a dictionary (or hash map) where the keys are the full paths of the leaf nodes and the values are the aggregated values for those leaf nodes. Input: A list of strings representing paths and a list of integers representing the values associated with each path. The i-th string in the path list corresponds to the i-th integer in the value list. Output: A dictionary (or hash map) where the keys are the full paths of the leaf nodes and the values are the aggregated values for those leaf nodes.
{"paths":["a.b.c","a.b","a"],"values":[1,2,3]}
{"a.b.c":6}
{"paths":["x.y","x.z","x"],"values":[4,5,6]}
{"x.y":10,"x.z":11}
{"paths":["a","a.b","a.b.c","d"],"values":[10,5,2,8]}
{"a.b.c":17,"d":8}
1 ≤ number of paths ≤ 1000
1 ≤ length of each path ≤ 100
1 ≤ value of each entry ≤ 1000
Paths are case-sensitive
Paths will only contain lowercase letters and dots