Graduate Developer Interview Questions

5,194 graduate developer interview questions shared by candidates

- Find indices of elements for 2-sum, 3-sum, and 4-sum all in optimal time. 2-sum is easy, but 3-sum and 4-sum should be O(n^2) which is tricky because you need to find indices, not just the elements and there can be duplicate elements. Still don't understand solution to this day - Connect next pointers of all leaf nodes in binary tree. Tricky part is you must do it without extra space so you can't create a queue. I solved using a queue at first and thought solving without extra space was just a followup but I got rejected so seems like you have to do optimal space or else you'll get no hire.
avatar

Software Engineer, University Graduate

Interviewed at SingleStore

3.9
Aug 24, 2022

- Find indices of elements for 2-sum, 3-sum, and 4-sum all in optimal time. 2-sum is easy, but 3-sum and 4-sum should be O(n^2) which is tricky because you need to find indices, not just the elements and there can be duplicate elements. Still don't understand solution to this day - Connect next pointers of all leaf nodes in binary tree. Tricky part is you must do it without extra space so you can't create a queue. I solved using a queue at first and thought solving without extra space was just a followup but I got rejected so seems like you have to do optimal space or else you'll get no hire.

Viewing 1991 - 2000 interview questions

Glassdoor has 5,194 interview questions and reports from Graduate developer interviews. Prepare for your interview. Get hired. Love your job.