Hi - There's a possible bug with this code regarding storing the actual *intervals* that lead to the maximum weight ...

Hi - There's a possible bug with this code regarding storing the actual *intervals* that lead to the maximum weight.  I don't have a possible fix here because I discovered this when migrating this code to C++ (not in a Git repository at the moment).

The code comments in this pull request describe the possible bug.  Let me know if you agree, if you have a chance at some point!

Thanks,
Dan
Hi @daniel347x, I know this is a bit late, but figured it might be useful to someone else coming in.

I don't think that this situation can ever occur. We start from the last interval via `compute_solution(len(I) - 1)`, so if `p[j]` points pretty far back, `j-1` won't be appended to `O` until we arrive to it via the else clause.