I was referred to Google by a HR I know, I had innterviewed on 4th March 2020.
The interviewer was polite and nice.
The question I was asked was given a set of prime numbers return all possible composite numbers from the given set (given numbers included).
For example :
Input: [2, 3, 5]
Output : [1, 2, 3, 5, 6, 10, 15, 30]
I gave a solution that took 2^n time complexity.
My approach was initialize a set like this {1}, then take each element of the array and multiply it with the elements in the result set i.e.
Start : {1}
i = 0 : {1, 2}
i = 1 : {1, 2, 3, 6}
and so on.
Two days later I was informed that I was not selected.