I received an online coding challenge, and after about a week, I was told I was rejected.
I didn't manage to pass the coding challenge, mainly due to time limitations.
The question provided an array a which contained a permutation of the first n natural numbers, along with a number k. You have a series of plants, and initially, all plants are not in bloom. At the i-th iteration, the plant at the location specified by the value i in the array was going to bloom. Once 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]:
Initial plants: 0 0 0 0
Iteration 1:
1 0 0 0 (1 group of size 1)
Iteration 2:
1 0 1 0 (2 groups of size 1)
Iteration 3:
1 1 1 0 (1 group of size 3)
Iteration 4:
1 1 1 1 (1 group of size 4)
The following metrics were computed from 3,728 interview experiences for the Google Software Engineer role in United States.
Google's interview process for their Software Engineer roles in the United States is extremely selective, failing the vast majority of engineers.
Candidates reported having very good feelings for Google's Software Engineer interview process in United States.