I interviewed at Google for a L4 testing position. This interview is similar to the regular Software Engineering interview, but with some more emphasis on testing questions. Of the five interviews I had, one was a "soft" interview about leadership and social wisdom. The other four were very similar: write an algorithm, determine the runtime complexity, and create some test cases for it.
For testing specific questions, I was asked how I would test the online google calculator. I was also asked what instances in my career Ive experienced flaky test cases. I mentioned a few instances, but somehow forgot to mention selenium tests which can be notoriously flaky.
I dont have an offer yet, but the recruiter told me unofficially I'll get one.
Round 1: [Medium+]
-
This is the question I did the weakest on. I was going about it a bit slowly and considering brute force solutions first and my interviewer interrupted me to tell me to store all the Xs and Ys in 2 separate lists. It got confusing from there. I would probably have tried some modified BFS if left to my own devices.
Round 2: [Medium]
-
Given two arrays of some objects, match all objects in the opposite array by the character value. Multiply the integer together for each matching object and add it to a running total which is to be returned. i.e...
class SomeObject { char c; int a; }[{ c: 'a', a: 5 }, {c: 'b', a: 6}]
[{ c: 'b', a: 4}, {c: 'a', a:2}]The "a"s and the "b"s match up to form 5 * 2 + 6 * 4 = 34
NOTE: this question was intentionally asked obtusely, you are supposed to ask what happens if there are multiple object in one array with the same character, or no matching character in the other array.
Round 3: [Medium]
Round 4: [Easy+]
-
Write a "git bisect" implementation where the inputs are an array of code revisions and you have some external function you can call to run tests on a chosen revision.
Variation of https://leetcode.com/problems/first-bad-versionMy solution from memory:
int bisect(vector<int> revisions) { int min = 0, max = revisions.size() - 1; while(min + 1 < max) { int guess = (min + max ) / 2; bool goodRevision = runTests(revisions[guess]); if(goodRevision) { min = guess; } else max = guess; } return max; }


