349. Intersection of Two Arrays

find intersection, use set, this one is better
sort first, then use binary search, find and add into set, this is another thought, but time complexity is not good.
JS
Last updated