Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

README.md

Intersection of Three Sorted Arrays (Easy 1213)

Given three integer arrays arr1, arr2 and arr3 sorted in strictly increasing order, return a sorted array of only the integers that appeared in all three arrays.

Solution:

Click here Three pointers, compare them, if equal, add to result, if not, advance pointer that is behind others. O(n + m + k) time, O(1) space.



Installation

Run make to run python and Swift files.