Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

1) I'm going to leave this one here, because I think we might be having a semantic disconnect.

2) ... the result is the same.

Ahh, but it's not. When looping over consecutive subseqs, i's scope is the inner loop, and you lose i's value on exit, which means you can't use it as the next outer loop's lower bound. The previous upper bound in your example is 29, but we want 30, which means we're back to index-jockeying. This is the common situation Dijkstra was referring to.

Regardless, I've enjoyed the back and forth with you. You may come back with a devastating rebuttal, but I've got to keep working. Until next time! :)



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: