fast_array_intersect icon indicating copy to clipboard operation
fast_array_intersect copied to clipboard

You are not the fastest

Open uncaught opened this issue 1 year ago • 2 comments

I'm beating you by almost double ;)

image

function arrayAndCombiner(a, b) {
  if (!a.length) {
    return a;
  }
  if (!b.length) {
    return b;
  }
  const bSet = new Set(b);
  return a.filter((i) => bSet.has(i));
}

uncaught avatar Aug 30 '24 12:08 uncaught

🎉 congrats

lovasoa avatar Aug 30 '24 12:08 lovasoa

:p

lovasoa avatar Aug 30 '24 12:08 lovasoa