This is a bit too convoluted... why use a `found` variable (found what?), when you could just check for `j > 0` and make everyone understand what's going on?