Try to improve the intersection question by binary search, but I did not finish the coding.
Anonymous
You should have started with 2 pointers i,j one for each array, always increment the pointer for the array that has the minimum value between a[i] and b[j]. If you ended one array, continue the other until a[i]>b[b.length()-1] This has complexity 0(n+m). Your algo has complexity O(nlogm) for searching if all elements in n are in m
Check out your Company Bowl for anonymous work chats.