Software Engineer Software Developer Interview Questions

467,266 software engineer software developer interview questions shared by candidates

The question gave me as input an array a that had a permutations of the first n natural numbers and a number k. You have a series of plants, at the beginning all the plants are not in bloom. At the ith iteration the plant at the location of the array that had the value i was going to bloom. If a plant bloomed it stayed bloomed forever. We define a group as the number of adjacent bloomed plants. Find the last iteration that had a group of size k. E.g. Given a = [ 1 3 2 4] plants: 0 0 0 0 1 0 0 0 (1 group of size 1) 1 0 1 0 (2 groups of size 1) 1 1 1 0 (1 group of size 3) 1 1 1 1 (1 group of size 4)
avatar

Software Engineer

Interviewed at Google

4.4
Apr 16, 2018

The question gave me as input an array a that had a permutations of the first n natural numbers and a number k. You have a series of plants, at the beginning all the plants are not in bloom. At the ith iteration the plant at the location of the array that had the value i was going to bloom. If a plant bloomed it stayed bloomed forever. We define a group as the number of adjacent bloomed plants. Find the last iteration that had a group of size k. E.g. Given a = [ 1 3 2 4] plants: 0 0 0 0 1 0 0 0 (1 group of size 1) 1 0 1 0 (2 groups of size 1) 1 1 1 0 (1 group of size 3) 1 1 1 1 (1 group of size 4)

I can't go into details about the problems. But I wish I had studied my graph algorithms a little more closely. Make sure you know your big-O algorithm classifications. Almost every interviewer asked me something to do with that.
avatar

Software Engineer

Interviewed at Google

4.4
Mar 20, 2014

I can't go into details about the problems. But I wish I had studied my graph algorithms a little more closely. Make sure you know your big-O algorithm classifications. Almost every interviewer asked me something to do with that.

Viewing 1631 - 1640 interview questions

See Interview Questions for Similar Jobs

Glassdoor has 467,266 interview questions and reports from Software engineer software developer interviews. Prepare for your interview. Get hired. Love your job.