Zero sum interval

Dessign the function @intervalo_suma_cero(f, i)@ that, given a list ff of integers and an integer ii such that 0i<len(f)0 \le i < len(f), returns the smallest value jij \ge i such that the sum of the elements in ff from position ii to position jj is zero. If there is no such value, it will return -1.

Sample session

Problem information

Author: InfBesos

Generation: 2026-01-25T14:59:46.814Z

© Jutge.org, 2006–2026.
https://jutge.org