Software Developer Co Op Interview Questions

710,494 software developer co op interview questions shared by candidates

Given two sorted input arrays which contain a two element array of [key, value], write a function which multiplies the two arrays together and sums them where the "key" matches. Example: "v1 = [[1, 3], [2, 4], [99, 3]]; v2 = [[2,3],[5,9],[99,1]]" results in "15". I first brute forced it with O(n*m) then used two pointers which resulted in O(n+m) then he asked me to write it in O(n log m). I could not think of an algorithm at the time for O(n log m).
avatar

Software Engineer

Interviewed at Meta

3.6
Dec 10, 2015

Given two sorted input arrays which contain a two element array of [key, value], write a function which multiplies the two arrays together and sums them where the "key" matches. Example: "v1 = [[1, 3], [2, 4], [99, 3]]; v2 = [[2,3],[5,9],[99,1]]" results in "15". I first brute forced it with O(n*m) then used two pointers which resulted in O(n+m) then he asked me to write it in O(n log m). I could not think of an algorithm at the time for O(n log m).

Viewing 291 - 300 interview questions

See Interview Questions for Similar Jobs

Glassdoor has 710,494 interview questions and reports from Software developer co op interviews. Prepare for your interview. Get hired. Love your job.