Take items once their values have reached a sum

Check this out for recursive sum. It’s an old image so it’s a little hard to read, but you’re just getting an incrementally longer sublist to sum together.

Once you have your recursive sum you can check to see which values are <= 20 and mask the list.

1 Like