48 practice questions for Google QA Engineer interviews
Google QA engineer interviews test automation frameworks, test strategy, CI integration, performance testing, and debugging complex multi-service systems.
Category: Array coding problem# Question Given a string where letters are sorted in alphabetical order, identify all letters that appear more than twice and record their first and...Input: Array Output: Computed result
codingMediumVerified Question#2
2. GPS Error Tracking
Category: Algorithm coding problem# Question You are tracking GPS location errors by comparing measured GPS locations against a set of "golden" (reference) locations. Each location...Input: List Output: Computed result
codingHardVerified Question#3
3. Minimum Boxing Area
Category: Binary search coding problem# Question Design a data structure to maintain a dynamic set of points on a 2D coordinate plane. Support operations to insert points, remove points,...Input: List Output: Integer
codingMediumVerified Question#4
4. Reverse Segment of Linked List
Category: Linked list coding problem# Question Given a singly linked list, reverse the second half of the list and then interleave the nodes from the first half and the reversed second...Input: Linked list Output: Computed result
codingMediumVerified Question#5
5. Unpainted Segments
Category: Binary search coding problem# Question You are given a range [A, B] and a sequence of painting operations. For each operation [L, R], calculate the total length of unpainted...Input: Array of intervals Output: Computed result
codingMediumVerified Question#6
6. Running Tests With Failing Pairs
Category: Algorithm coding problem# Question You are given a set of test cases and a black-box function runTests() that accepts a subset of these test cases and returns whether...Input: List Output: Integer
codingMediumVerified Question#7
7. Connected Crop Allocation
Category: Grid/matrix coding problem# Question You are given an M x N garden grid and a list of crops, each requiring a specific number of plots. The total number of plots required by...Input: 2D grid Output: Computed result
codingMediumVerified Question#8
8. [CodeSignal] Maximum Zero-Sum Triplets
Category: Array coding problem# Question You are given an array A of integers. A triplet is a sequence of three consecutive elements. A triplet is called zero-sum if the...Input: Array Output: Computed result
codingEasyVerified Question#9
9. [CodeSignal] Coin Table Game
Category: String coding problem# Question A player is playing a game in which coins are placed on and removed from a table. The game consists of multiple rounds. At the beginning...Input: String Output: Computed result
codingMediumVerified Question#10
10. Longest Match Tokenizer
Category: Array coding problemYou are given a text string text and a dictionary array where each element is in the format "<key>:<id>". Here key is a token string and id...Input: Array Output: Computed result
codingHardVerified Question#11
11. Dual Extremes Queue
Category: Queue-based coding problemDesign a StreamBuffer class that buffers a stream of integer latency samples in FIFO order and supports O(1) access to both the minimum and maximum...Input: Integer(s) Output: Integer
codingMediumVerified Question#12
12. Daily Branch Pruning
Category: Tree coding problemA file system manages a directory tree. Each day, all leaf directories (those with no child directories) are simultaneously removed. Directories that...Input: Array Output: Array
codingMediumVerified Question#13
13. Path Router
Category: Algorithm coding problem# Question Design a PathRouter class that maps URL-like path patterns to handler names. Patterns may contain wildcard segments (*) that match any...Input: Number(s) Output: Computed result
codingMediumVerified Question#14
14. Frequency Merge Tree
Category: Tree coding problem# Question Given a string, build a Frequency Merge Tree as follows: 1. Count the frequency of each character in the string. 2. Create a leaf node...Input: String Output: Computed result
codingHardVerified Question#15
15. Expression Simplifier
Category: String coding problemGiven an algebraic expression string containing single lowercase-letter variables, the operators + and -, and parentheses ( and ), simplify...Input: String Output: Computed result
codingMediumVerified Question#16
16. Largest Island Perimeter
Category: Grid/matrix coding problemYou are given an m x n binary grid where each cell is either '1' (land) or '0' (water). A group of connected land cells (connected horizontally...Input: 2D grid Output: Computed result
codingHardVerified Question#17
17. Interval Coverage Counter
Category: Interval-based coding problemGiven a list of closed intervals on the integer number line, build a data structure that efficiently answers point-coverage queries. A closed...Input: List Output: Computed result
codingHardhash map#1
1. [OA] Hash Map — Create a test result aggregator to summarize QA results across Google services
In Google, managing multiple services and ensuring quality across the board is vital. A robust tool to aggregate test results will streamline the QA processes. Problem Statement: You need to create a TestResultAggregator that consolidates test results from various components. Implement methods to add the results and compute the overall results efficiently. - add_test_result(service_name: str, passed: bool) -> None: Adds a test result for a specific service. - get_overall_summary() -> Dict[str, int]: Returns a summary of tests, indicating how many passed and failed. Example 1: Input: add_test_result('AuthService', True) Input: add_test_result('PaymentService', False) Input: get_overall_summary() Output: { 'passed': 1, 'failed': 1 } Explanation: One test passed and one test failed. Constraints: - `1 <= number of services <= 1000 - Passed results are boolean values.
codingHardsliding window#2
2. [OA] Sliding Window — Implement a method to monitor the response time of Google Cloud APIs
In various Google Cloud services, understanding response times is crucial for performance monitoring. The ability to swiftly analyze the average response time over a sliding window will aid in identifying and mitigating issues in real-time. Problem Statement: You are tasked with creating a function that calculates the average response time of Google Cloud APIs over a fixed window size. Implement ResponseTimeMonitor class that maintains a list of response times and computes the average over the last k responses. - add_response_time(time: float) -> None: Adds a new response time to the monitor. - get_average(k: int) -> float: Returns the average of the last k response times. Example 1: Input: add_response_time(200) Input: add_response_time(300) Input: get_average(2) Output: 250.0 Explanation: The average of the last two response times (200 and 300) is 250.0. Constraints: - 1 <= k <= 1000 - `0 <= time <= 10000
system designSeniorapi design#3
3. [OA] OOP Design — Design a Load Test Orchestrator for Google Services
As Google scales, it's imperative to effectively manage load testing across services to ensure system reliability. A well-structured orchestrator will help distribute load tests systematically. Problem Statement: Create a LoadTestOrchestrator class that enables users to schedule load tests on multiple services concurrently. You should define methods for adding services and managing the scheduling of tests. - add_service(service_name: str) -> None: Add a new service for testing. - schedule_load_test(test_id: str) -> None: Schedules a load test for all added services. - get_services() -> List[str]: Retrieves the list of services slated for load testing. Example 1: Input: add_service('SearchService') Input: add_service('AuthService') Input: schedule_load_test('loadTest1') Input: get_services() Output: ['SearchService', 'AuthService'] Explanation: Both services are set for load testing. Constraints: - 1 <= number of services <= 100 - Service names are unique strings.
system designSeniorapi design#4
4. [OA] OOP Design — Design a Flaky Test Detector for Google
In the world of CI/CD, identifying flaky tests is crucial for maintaining the reliability of Google services. A systematic approach to detect and flag such tests will enhance productivity. Problem Statement: Design a FlakyTestDetector class to analyze test runs and identify flaky tests based on certain run results. You must define specific methods for logging results and for flagging flaky tests. - log_test_run(test_id: str, result: bool) -> None: Logs the result of a test run. - get_flaky_tests() -> List[str]: Returns a list of tests identified as flaky. Example 1: Input: log_test_run('test1', True) Input: log_test_run('test1', False) Input: get_flaky_tests() Output: ['test1'] Explanation: The test has inconsistent results, marking it as flaky. Constraints: - 1 <= number of test runs <= 10000 - Test identifiers are unique strings.