code: function lowestUnused(xs) {
      let unused = 0;
      for (let i = 0; i < xs.length; i++) {
          if (xs[i] === unused) {
              unused++;
              i = -1; // go back to the beginning
          }
      }
      return unused;
  }
docs: This is a flavor of Shlemiel the painter's algorithm. http://wiki.c2.com/?ShlemielThePainter  TODO: figure out how to run tests, but I've spot checked these: [] => 0 [0, 1, 2, 3, 4] => 5 [0, 1, 3, 4] => 2 [1, 3, 4] => 0 [4] => 0 [4, 3, 2, 1, 0] => 5 [4, 2, 1, 0] => 3 [4, 2, 1, 10] => 0 [2, 0, 3, 4] => 1