FunctionRacerProblemsRace

Difference of Two Arrays

BeginnerHash mapsPython, JavaScript, TypeScript, Java, C++

Return a list of two lists:

Sort each inner list in increasing order.

Example 1

nums1 [1,2,3,3]
nums2 [2,4,6]
returns [[1,3],[4,6]]

nums1 alone has 1 and 3; nums2 alone has 4 and 6.

Constraints

Race itor take your time

Write it in your browser, against the clock. The model solution, stepped through line by line, comes after.

More Hash maps problems