New Grad Software Engineer Interview Questions

2,866 new grad software engineer interview questions shared by candidates

The question was: Given a sparse bit array A of size M stored in a database. The database provides an API query(L,R) which returns 1 if there is at least one bit equal to one in A[L..R] and 0 otherwise. You want to find all the 1 bits in a reasonable number of queries. E.g. for array 01100000001, positions of 1 bits are {1, 2, 10}. Return the array of all the positions of 1's. T.C -> It should not be linear. S.C -> It should be constant. You should not use recursion or extra function. (this part was the followup to the recursive and queue approach)
avatar

Software Engineer New Grad

Interviewed at Google

4.4
Aug 17, 2025

The question was: Given a sparse bit array A of size M stored in a database. The database provides an API query(L,R) which returns 1 if there is at least one bit equal to one in A[L..R] and 0 otherwise. You want to find all the 1 bits in a reasonable number of queries. E.g. for array 01100000001, positions of 1 bits are {1, 2, 10}. Return the array of all the positions of 1's. T.C -> It should not be linear. S.C -> It should be constant. You should not use recursion or extra function. (this part was the followup to the recursive and queue approach)

Viewing 1181 - 1190 interview questions

Glassdoor has 2,866 interview questions and reports from New grad software engineer interviews. Prepare for your interview. Get hired. Love your job.