Sponsored
Use these hints if you're stuck. Try solving on your own first.
Use a dictionary/hash map to keep track of the indices and their sum values.
Solve with full IDE support and test cases