Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion data_structures/arrays/product_sum.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def product_sum(arr: list[int | list], depth: int) -> int:
Recursively calculates the product sum of an array.

The product sum of an array is defined as the sum of its elements multiplied by
their respective depths. If an element is a list, its product sum is calculated
their respective depths. If an element is a list, its product sum is calculated
recursively by multiplying the sum of its elements with its depth plus one.

Args:
Expand Down