This question evaluates traversal techniques and nested-data structure handling—specifically depth-weighted aggregation using DFS and BFS—along with algorithmic reasoning about time and space complexity in the Coding & Algorithms domain.

Given a nested collection that can contain integers or other nested collections, compute the depth-weighted sum where each integer is multiplied by its 1-based depth. Implement both DFS and BFS solutions, analyze time and space complexity, and discuss how you would adapt the approach if the weighting is inverted (deepest level has weight 1).