A learner proposed the following solution:
Time complexity is not analyzed correctly. Also, this is not the most optimized solution. Provided solution’s time complexity is O(L1+L2+L3) where L1 is size of first array, L2 for second and L3 for third array. Consider this case: [1,2,4,6,7,9] [2,3,5,6,8,9] [3,4,5,7,8,9] If we use hash table and binary search, we can iterate through two arrays and find common element using hashtable, and use binary search for third array which runs logarithmic. So total complexity would be: O(L1+L2+logL3) with additional O(L1) memory. We can change the order of the arrays by size for less memory and fast performance by doing L1