code: static MeasuredNode pickBest(MeasuredNode a, MeasuredNode b) {
      if (a.length == b.length) {
        return (b.isChanged()) ? a : b;
      }
  
      return (a.length < b.length) ? a : b;
    }
docs: return the best, prefer unchanged