Skip to content

Latest commit

 

History

History

intersection-of-two-arrays-ii

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Intersection of Two Arrays II

LeetCode #: 350

Difficulty: Easy

Topics: Hash table, two pointers, binary search, sort.

Explanation

The solution here aims to also cater for the follow up questions in the problem.

First, we sort both the nums1 and nums2 arrays. Then, we use the two pointers technique on the sorted arrays to find their intersections.